Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
isindir committed May 5, 2024
1 parent 785898c commit 7246d82
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions pkg/kor/namespaces_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package kor

import (
"testing"
)

func TestIgnoreResourceType(t *testing.T) {
type args struct {
resource string
ignoreResources []string
}
tests := []struct {
name string
args args
want bool
}{
{
name: "non matching resource",
args: args{
resource: "pods",
ignoreResources: []string{
"configmaps",
"secrets",
},
},
want: false,
},
{
name: "matching resource",
args: args{
resource: "secrets",
ignoreResources: []string{
"configmaps",
"secrets",
},
},
want: true,
},
{
name: "empty resource ignore list",
args: args{
resource: "secrets",
ignoreResources: []string{},
},
want: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := ignoreResourceType(tt.args.resource, tt.args.ignoreResources); got != tt.want {
t.Errorf("ignoreResourceType() = %v, want %v", got, tt.want)
}
})
}
}

0 comments on commit 7246d82

Please sign in to comment.