Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
TestAllNamespacesHaveNameLabels: Ignore calico-system ns
Browse files Browse the repository at this point in the history
This commit adds a check to ignore system namespaces like
`calico-system` which is created by AKS.

Signed-off-by: Suraj Deshmukh <suraj@kinvolk.io>
  • Loading branch information
surajssd committed Jun 29, 2021
1 parent 61ad633 commit 5983dba
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/components/kubernetes/namespaces_labels_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ func TestAllNamespacesHaveNameLabels(t *testing.T) {
continue
}

// AKS creates this namespace which we don't label it hence ignore it.
if testutil.IsPlatformSupported(t, []testutil.Platform{testutil.PlatformAKS}) && name == "calico-system" {
continue
}

if name != labels[internal.NamespaceLabelKey] {
t.Fatalf("expected %q, got: %q", name, labels[internal.NamespaceLabelKey])
}
Expand Down

0 comments on commit 5983dba

Please sign in to comment.