From 30550f2c630fba24c2b2a7aac8883b9bbbe61f92 Mon Sep 17 00:00:00 2001 From: "Chris S. Kim" Date: Tue, 4 Jan 2022 11:24:56 -0500 Subject: [PATCH] testing: Revert assertion for virtual IP flag (#11932) --- agent/consul/system_metadata_test.go | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/agent/consul/system_metadata_test.go b/agent/consul/system_metadata_test.go index 61f62c8d15..633aa6bc40 100644 --- a/agent/consul/system_metadata_test.go +++ b/agent/consul/system_metadata_test.go @@ -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)) }