Implement kubectl annotation update command. Refactor kubectl annotate to decouple command framework from business logic.

This commit is contained in:
Janet Kuo
2015-07-23 15:43:48 -07:00
parent 6df4d6703b
commit 7e63213478
13 changed files with 1182 additions and 31 deletions

View File

@@ -256,7 +256,7 @@ func TestLabelFunc(t *testing.T) {
},
}
for _, test := range tests {
out, err := labelFunc(test.obj, test.overwrite, test.version, test.labels, test.remove)
err := labelFunc(test.obj, test.overwrite, test.version, test.labels, test.remove)
if test.expectErr {
if err == nil {
t.Errorf("unexpected non-error: %v", test)
@@ -266,8 +266,8 @@ func TestLabelFunc(t *testing.T) {
if !test.expectErr && err != nil {
t.Errorf("unexpected error: %v %v", err, test)
}
if !reflect.DeepEqual(out, test.expected) {
t.Errorf("expected: %v, got %v", test.expected, out)
if !reflect.DeepEqual(test.obj, test.expected) {
t.Errorf("expected: %v, got %v", test.expected, test.obj)
}
}
}