Skip to content

Commit

Permalink
remove namespaces because oss agent response doesnt provide it
Browse files Browse the repository at this point in the history
  • Loading branch information
kschoche committed Apr 2, 2021
1 parent bd4eba7 commit 9797b44
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions connect-inject/endpoints_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,8 @@ func TestReconcileCreateEndpoint(t *testing.T) {
check, err := consulClient.Agent().ChecksWithFilter(filter)
require.NoError(t, err)
require.EqualValues(t, len(check), 1)
var ignoredFields = []string{"Node", "Definition"}
// Ignoring Namespace because the response from ENT includes it and OSS does not.
var ignoredFields = []string{"Node", "Definition", "Namespace"}
require.True(t, cmp.Equal(check[tt.expectedAgentHealthCheck.CheckID], tt.expectedAgentHealthCheck, cmpopts.IgnoreFields(api.AgentCheck{}, ignoredFields...)))
}
})
Expand Down Expand Up @@ -1482,7 +1483,8 @@ func TestReconcileUpdateEndpoint(t *testing.T) {
check, err := consulClient.Agent().ChecksWithFilter(filter)
require.NoError(t, err)
require.EqualValues(t, len(check), 1)
var ignoredFields = []string{"Node", "Definition"}
// Ignoring Namespace because the response from ENT includes it and OSS does not.
var ignoredFields = []string{"Node", "Definition", "Namespace"}
require.True(t, cmp.Equal(check[tt.expectedAgentHealthCheck.CheckID], tt.expectedAgentHealthCheck, cmpopts.IgnoreFields(api.AgentCheck{}, ignoredFields...)))
}
})
Expand Down

0 comments on commit 9797b44

Please sign in to comment.