Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v10] Fix an issue DB rotation event get send to older remote cluster #14037

Merged
merged 10 commits into from
Jul 1, 2022
Prev Previous commit
Next Next commit
fix lint
greedy52 authored and github-actions committed Jun 30, 2022
commit e3478e801c6af41f6c31ca0d99e454bd15a7926e
13 changes: 1 addition & 12 deletions lib/services/watcher_test.go
Original file line number Diff line number Diff line change
@@ -518,17 +518,6 @@ func resourceDiff(res1, res2 types.Resource) string {
cmpopts.EquateEmpty())
}

func caDiff(ca1, ca2 types.CertAuthority) string {
return cmp.Diff(ca1, ca2,
cmpopts.IgnoreFields(types.Metadata{}, "ID"),
cmpopts.IgnoreFields(types.CertAuthoritySpecV2{}, "CheckingKeys", "TLSKeyPairs", "JWTKeyPairs"),
cmpopts.IgnoreFields(types.SSHKeyPair{}, "PrivateKey"),
cmpopts.IgnoreFields(types.TLSKeyPair{}, "Key"),
cmpopts.IgnoreFields(types.JWTKeyPair{}, "PrivateKey"),
cmpopts.EquateEmpty(),
)
}

// TestDatabaseWatcher tests that database resource watcher properly receives
// and dispatches updates to database resources.
func TestDatabaseWatcher(t *testing.T) {
@@ -784,7 +773,7 @@ func TestCertAuthorityWatcher(t *testing.T) {
require.NoError(t, err)
t.Cleanup(func() { require.NoError(t, sub.Close()) })

// Create a CA and ensure we receive the events.
// Create a CA and ensure we receive the event.
ca := newCertAuthority(t, "test", types.HostCA)
require.NoError(t, caService.UpsertCertAuthority(ca))
waitForEvent(t, sub, types.HostCA, "test", types.OpPut)