mirror of https://github.com/status-im/consul.git
Fix snapshot IsEmpty
This commit is contained in:
parent
3afe816a94
commit
034d7d83d4
|
@ -104,7 +104,8 @@ func (c *configSnapshotTerminatingGateway) IsEmpty() bool {
|
||||||
len(c.WatchedIntentions) == 0 &&
|
len(c.WatchedIntentions) == 0 &&
|
||||||
len(c.ServiceGroups) == 0 &&
|
len(c.ServiceGroups) == 0 &&
|
||||||
len(c.WatchedServices) == 0 &&
|
len(c.WatchedServices) == 0 &&
|
||||||
len(c.ServiceResolvers) == 0
|
len(c.ServiceResolvers) == 0 &&
|
||||||
|
len(c.WatchedResolvers) == 0
|
||||||
}
|
}
|
||||||
|
|
||||||
type configSnapshotMeshGateway struct {
|
type configSnapshotMeshGateway struct {
|
||||||
|
|
|
@ -841,14 +841,8 @@ func TestState_WatchesAndUpdates(t *testing.T) {
|
||||||
require.True(t, snap.ConnectProxy.IsEmpty())
|
require.True(t, snap.ConnectProxy.IsEmpty())
|
||||||
require.True(t, snap.MeshGateway.IsEmpty())
|
require.True(t, snap.MeshGateway.IsEmpty())
|
||||||
require.True(t, snap.IngressGateway.IsEmpty())
|
require.True(t, snap.IngressGateway.IsEmpty())
|
||||||
|
require.True(t, snap.TerminatingGateway.IsEmpty())
|
||||||
require.Equal(t, indexedRoots, snap.Roots)
|
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)
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue