Unverified Commit 506ed05b authored by Matthew Fisher's avatar Matthew Fisher Committed by GitHub

Merge pull request #3899 from Serg1i/feat/kindSorter-add-PodSecurityPolicy

Create PodSecurityPolicy before Pods and ServiceAccounts
parents e7bd2a34 7631b8a9
...@@ -30,6 +30,7 @@ var InstallOrder SortOrder = []string{ ...@@ -30,6 +30,7 @@ var InstallOrder SortOrder = []string{
"Namespace", "Namespace",
"ResourceQuota", "ResourceQuota",
"LimitRange", "LimitRange",
"PodSecurityPolicy",
"Secret", "Secret",
"ConfigMap", "ConfigMap",
"StorageClass", "StorageClass",
...@@ -80,6 +81,7 @@ var UninstallOrder SortOrder = []string{ ...@@ -80,6 +81,7 @@ var UninstallOrder SortOrder = []string{
"StorageClass", "StorageClass",
"ConfigMap", "ConfigMap",
"Secret", "Secret",
"PodSecurityPolicy",
"LimitRange", "LimitRange",
"ResourceQuota", "ResourceQuota",
"Namespace", "Namespace",
......
...@@ -85,6 +85,10 @@ func TestKindSorter(t *testing.T) { ...@@ -85,6 +85,10 @@ func TestKindSorter(t *testing.T) {
Name: "o", Name: "o",
Head: &util.SimpleHead{Kind: "Pod"}, Head: &util.SimpleHead{Kind: "Pod"},
}, },
{
Name: "3",
Head: &util.SimpleHead{Kind: "PodSecurityPolicy"},
},
{ {
Name: "q", Name: "q",
Head: &util.SimpleHead{Kind: "ReplicaSet"}, Head: &util.SimpleHead{Kind: "ReplicaSet"},
...@@ -136,8 +140,8 @@ func TestKindSorter(t *testing.T) { ...@@ -136,8 +140,8 @@ func TestKindSorter(t *testing.T) {
order SortOrder order SortOrder
expected string expected string
}{ }{
{"install", InstallOrder, "abcde1fgh2ijklmnopqrstuvw!"}, {"install", InstallOrder, "abc3de1fgh2ijklmnopqrstuvw!"},
{"uninstall", UninstallOrder, "wvmutsrqponlkji2hgf1edcba!"}, {"uninstall", UninstallOrder, "wvmutsrqponlkji2hgf1ed3cba!"},
} { } {
var buf bytes.Buffer var buf bytes.Buffer
t.Run(test.description, func(t *testing.T) { t.Run(test.description, func(t *testing.T) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment