Add additional test cases

Signed-off-by: Niklas Wagner <n.wagner@finatix.de>
pull/9534/head
Niklas Wagner 5 years ago
parent 5cdf103191
commit 59b994daf6
No known key found for this signature in database
GPG Key ID: 8AED02178FD25987

@ -166,6 +166,21 @@ func TestKindSorter(t *testing.T) {
Name: "x", Name: "x",
Head: &SimpleHead{Kind: "HorizontalPodAutoscaler"}, Head: &SimpleHead{Kind: "HorizontalPodAutoscaler"},
}, },
{
Name: "9",
Head: &SimpleHead{Kind: "MyCustomResourceBeforeDeployment"},
InstallBefore: []string{"Deployment"},
},
{
Name: "8",
Head: &SimpleHead{Kind: "MyCustomResourceBeforeEverything"},
InstallBefore: InstallOrder,
},
{
Name: "7",
Head: &SimpleHead{Kind: "MyCustomResourceBeforeMultipleResources"},
InstallBefore: []string{"Deployment", "Service", "ServiceAccount"},
},
} }
for _, test := range []struct { for _, test := range []struct {
@ -173,8 +188,8 @@ func TestKindSorter(t *testing.T) {
uninstall bool uninstall bool
expected string expected string
}{ }{
{"install", false, "aAbcC3deEf1gh2iIjJkKlLmnopqrxstuvw!"}, {"install", false, "8aAbcC37deEf1gh2iIjJkKlLmnopq9rxstuvw!"},
{"uninstall", true, "wvmutsxrqponLlKkJjIi2hg1fEed3CcbAa!"}, {"uninstall", true, "wvmutsxr9qponLlKkJjIi2hg1fEed73CcbAa8!"},
} { } {
var buf bytes.Buffer var buf bytes.Buffer
t.Run(test.description, func(t *testing.T) { t.Run(test.description, func(t *testing.T) {

Loading…
Cancel
Save