chore: rename "InsertOrUpdate" to Upsert around the codebase (#6823)

* chore: rename "InsertOrUpdate" to Upsert around the codebase

The shorter name uses up less line width, is easier to read
and is used more often.

* make gen
This commit is contained in:
Ammar Bandukwala
2023-03-27 19:55:10 -05:00
committed by GitHub
parent f88f273cd6
commit 42b3d90221
10 changed files with 33 additions and 33 deletions

View File

@ -102,11 +102,11 @@ func (s *MethodTestSuite) TestSystemFunctions() {
DailyCost: 10,
}).Asserts(rbac.ResourceSystem, rbac.ActionUpdate).Returns(o)
}))
s.Run("InsertOrUpdateLastUpdateCheck", s.Subtest(func(db database.Store, check *expects) {
s.Run("UpsertLastUpdateCheck", s.Subtest(func(db database.Store, check *expects) {
check.Args("value").Asserts(rbac.ResourceSystem, rbac.ActionUpdate)
}))
s.Run("GetLastUpdateCheck", s.Subtest(func(db database.Store, check *expects) {
err := db.InsertOrUpdateLastUpdateCheck(context.Background(), "value")
err := db.UpsertLastUpdateCheck(context.Background(), "value")
require.NoError(s.T(), err)
check.Args().Asserts(rbac.ResourceSystem, rbac.ActionRead)
}))