testing: Revert assertion for virtual IP flag (#11932)

This commit is contained in:
Chris S. Kim 2022-01-04 11:24:56 -05:00 committed by GitHub
parent d1ac40e967
commit 30550f2c63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 11 deletions

View File

@ -33,10 +33,10 @@ func TestLeader_SystemMetadata_CRUD(t *testing.T) {
state := srv.fsm.State()
// Initially has one entry for virtual-ips feature flag
// Initially has no entries
_, entries, err := state.SystemMetadataList(nil)
require.NoError(t, err)
require.Len(t, entries, 1)
require.Len(t, entries, 0)
// Create 3
require.NoError(t, srv.setSystemMetadataKey("key1", "val1"))
@ -53,13 +53,12 @@ func TestLeader_SystemMetadata_CRUD(t *testing.T) {
_, entries, err = state.SystemMetadataList(nil)
require.NoError(t, err)
require.Len(t, entries, 4)
require.Len(t, entries, 3)
require.Equal(t, map[string]string{
structs.SystemMetadataVirtualIPsEnabled: "true",
"key1": "val1",
"key2": "val2",
"key3": "",
"key1": "val1",
"key2": "val2",
"key3": "",
}, mapify(entries))
// Update one and delete one.
@ -68,11 +67,10 @@ func TestLeader_SystemMetadata_CRUD(t *testing.T) {
_, entries, err = state.SystemMetadataList(nil)
require.NoError(t, err)
require.Len(t, entries, 3)
require.Len(t, entries, 2)
require.Equal(t, map[string]string{
structs.SystemMetadataVirtualIPsEnabled: "true",
"key2": "val2",
"key3": "val3",
"key2": "val2",
"key3": "val3",
}, mapify(entries))
}