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

@ -312,10 +312,10 @@ func (s *MethodTestSuite) TestLicense() {
check.Args(database.InsertLicenseParams{}).
Asserts(rbac.ResourceLicense, rbac.ActionCreate)
}))
s.Run("InsertOrUpdateLogoURL", s.Subtest(func(db database.Store, check *expects) {
s.Run("UpsertLogoURL", s.Subtest(func(db database.Store, check *expects) {
check.Args("value").Asserts(rbac.ResourceDeploymentValues, rbac.ActionCreate)
}))
s.Run("InsertOrUpdateServiceBanner", s.Subtest(func(db database.Store, check *expects) {
s.Run("UpsertServiceBanner", s.Subtest(func(db database.Store, check *expects) {
check.Args("value").Asserts(rbac.ResourceDeploymentValues, rbac.ActionCreate)
}))
s.Run("GetLicenseByID", s.Subtest(func(db database.Store, check *expects) {
@ -336,12 +336,12 @@ func (s *MethodTestSuite) TestLicense() {
check.Args().Asserts().Returns("")
}))
s.Run("GetLogoURL", s.Subtest(func(db database.Store, check *expects) {
err := db.InsertOrUpdateLogoURL(context.Background(), "value")
err := db.UpsertLogoURL(context.Background(), "value")
require.NoError(s.T(), err)
check.Args().Asserts().Returns("value")
}))
s.Run("GetServiceBanner", s.Subtest(func(db database.Store, check *expects) {
err := db.InsertOrUpdateServiceBanner(context.Background(), "value")
err := db.UpsertServiceBanner(context.Background(), "value")
require.NoError(s.T(), err)
check.Args().Asserts().Returns("value")
}))