Make resource selector args case insensitive
So that `<kind>/<name>` flags can be supplied as: * `secret/foo` * `Secret/foo` * `SeCrEt/foo` But result in: `Secret/foo`. Signed-off-by: Hidde Beydals <hello@hidde.co>
This commit is contained in:
@@ -32,6 +32,7 @@ func TestKustomizationSource_Set(t *testing.T) {
|
||||
}{
|
||||
{"supported", fmt.Sprintf("%s/foo", sourcev1.GitRepositoryKind), fmt.Sprintf("%s/foo", sourcev1.GitRepositoryKind), false},
|
||||
{"default kind", "foo", fmt.Sprintf("%s/foo", sourcev1.GitRepositoryKind), false},
|
||||
{"lower case kind", "gitrepository/foo", fmt.Sprintf("%s/foo", sourcev1.GitRepositoryKind), false},
|
||||
{"unsupported", "Unsupported/kind", "", true},
|
||||
{"missing name", fmt.Sprintf("%s/", sourcev1.GitRepositoryKind), "", true},
|
||||
{"empty", "", "", true},
|
||||
|
||||
Reference in New Issue
Block a user