Skip to content

Commit

Permalink
Remove TestIsInternalKey test changes
Browse files Browse the repository at this point in the history
  • Loading branch information
arybolovlev committed Nov 28, 2023
1 parent c750b93 commit 183e9fa
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions kubernetes/structures_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

func TestIsInternalKey(t *testing.T) {
cases := []struct {
testCases := []struct {
Key string
Expected bool
}{
Expand All @@ -26,14 +26,14 @@ func TestIsInternalKey(t *testing.T) {
{"kubectl.kubernetes.io", true},
{"pv.kubernetes.io/any/path", true},
}
for _, c := range cases {
t.Run(c.Key, func(t *testing.T) {
isInternal := isInternalKey(c.Key)
if c.Expected && isInternal != c.Expected {
t.Fatalf("Expected %q to be internal", c.Key)
for _, tc := range testCases {
t.Run(tc.Key, func(t *testing.T) {
isInternal := isInternalKey(tc.Key)
if tc.Expected && isInternal != tc.Expected {
t.Fatalf("Expected %q to be internal", tc.Key)
}
if !c.Expected && isInternal != c.Expected {
t.Fatalf("Expected %q not to be internal", c.Key)
if !tc.Expected && isInternal != tc.Expected {
t.Fatalf("Expected %q not to be internal", tc.Key)
}
})
}
Expand Down

0 comments on commit 183e9fa

Please sign in to comment.