Fix snapshot IsEmpty

This commit is contained in:
freddygv 2020-04-23 18:16:09 -06:00
parent 3afe816a94
commit 034d7d83d4
2 changed files with 3 additions and 8 deletions

View File

@ -104,7 +104,8 @@ func (c *configSnapshotTerminatingGateway) IsEmpty() bool {
len(c.WatchedIntentions) == 0 &&
len(c.ServiceGroups) == 0 &&
len(c.WatchedServices) == 0 &&
len(c.ServiceResolvers) == 0
len(c.ServiceResolvers) == 0 &&
len(c.WatchedResolvers) == 0
}
type configSnapshotMeshGateway struct {

View File

@ -841,14 +841,8 @@ func TestState_WatchesAndUpdates(t *testing.T) {
require.True(t, snap.ConnectProxy.IsEmpty())
require.True(t, snap.MeshGateway.IsEmpty())
require.True(t, snap.IngressGateway.IsEmpty())
require.True(t, snap.TerminatingGateway.IsEmpty())
require.Equal(t, indexedRoots, snap.Roots)
require.Empty(t, snap.TerminatingGateway.WatchedServices)
require.Empty(t, snap.TerminatingGateway.ServiceGroups)
require.Empty(t, snap.TerminatingGateway.WatchedLeaves)
require.Empty(t, snap.TerminatingGateway.ServiceLeaves)
require.Empty(t, snap.TerminatingGateway.WatchedResolvers)
require.Empty(t, snap.TerminatingGateway.ServiceResolvers)
require.Empty(t, snap.TerminatingGateway.WatchedIntentions)
},
},
},