internal/host/plugin: remove custom queries for secrets (#1676)

* internal/host/plugin: remove custom queries for secrets

This removes the custom queries for host catalog secrets, now that #1658
has been merged.

It also does a lot of cleanup surrounding the related oplog entries,
using db.WithOplog natively.

* Simplify conflict actions by replacing SetColumnValues with SetColumns

* Remove unused oplog method
This commit is contained in:
Chris Marchesi authored and GitHub committed 2021-12-07 12:38:34 -08:00
1 parent 8c842df8a8
commit bf18555d5e
5 files changed
+83 -104

No files matched your search

@@ -424,10 +424,8 @@ func TestRepository_UpdateSet(t *testing.T) {
scopeWrapper, err := dbKmsCache.GetWrapper(ctx, testCatalog.GetScopeId(), kms.KeyPurposeDatabase)
require.NoError(t, err)
require.NoError(t, testCatalogSecret.encrypt(ctx, scopeWrapper))
testCatalogSecretQ, testCatalogSecretV := testCatalogSecret.upsertQuery()
secretsUpdated, err := dbRW.Exec(ctx, testCatalogSecretQ, testCatalogSecretV)
err = dbRW.Create(ctx, testCatalogSecret)
require.NoError(t, err)
require.Equal(t, 1, secretsUpdated)
// Create a test duplicate set. We don't use this set, it just
// exists to ensure that we can test for conflicts when setting