Revert "Extend all to more resources"

This commit is contained in:
Daniel Smith
2016-08-01 21:51:57 -07:00
committed by GitHub
parent 1ec1051170
commit b712bfd7ac
8 changed files with 46 additions and 151 deletions

View File

@@ -1154,6 +1154,39 @@ func TestReceiveMultipleErrors(t *testing.T) {
}
}
func TestReplaceAliases(t *testing.T) {
tests := []struct {
name string
arg string
expected string
}{
{
name: "no-replacement",
arg: "service",
expected: "service",
},
{
name: "all-replacement",
arg: "all",
expected: "rc,svc,pods,pvc",
},
{
name: "alias-in-comma-separated-arg",
arg: "all,secrets",
expected: "rc,svc,pods,pvc,secrets",
},
}
b := NewBuilder(testapi.Default.RESTMapper(), api.Scheme, fakeClient(), testapi.Default.Codec())
for _, test := range tests {
replaced := b.replaceAliases(test.arg)
if replaced != test.expected {
t.Errorf("%s: unexpected argument: expected %s, got %s", test.name, test.expected, replaced)
}
}
}
func TestHasNames(t *testing.T) {
tests := []struct {
args []string