refactor testapi and test scripts to prepare for multiple API groups.

This commit is contained in:
Chao Xu
2015-09-04 00:06:01 -07:00
parent 49702f9059
commit 9fc79e9d99
109 changed files with 1010 additions and 714 deletions

View File

@@ -391,7 +391,7 @@ func TestAnnotateErrors(t *testing.T) {
f, tf, _ := NewAPIFactory()
tf.Printer = &testPrinter{}
tf.Namespace = "test"
tf.ClientConfig = &client.Config{Version: testapi.Version()}
tf.ClientConfig = &client.Config{Version: testapi.Default.Version()}
buf := bytes.NewBuffer([]byte{})
cmd := NewCmdAnnotate(f, buf)
@@ -447,7 +447,7 @@ func TestAnnotateObject(t *testing.T) {
}),
}
tf.Namespace = "test"
tf.ClientConfig = &client.Config{Version: testapi.Version()}
tf.ClientConfig = &client.Config{Version: testapi.Default.Version()}
options := &AnnotateOptions{}
args := []string{"pods/foo", "a=b", "c-"}
@@ -494,7 +494,7 @@ func TestAnnotateObjectFromFile(t *testing.T) {
}),
}
tf.Namespace = "test"
tf.ClientConfig = &client.Config{Version: testapi.Version()}
tf.ClientConfig = &client.Config{Version: testapi.Default.Version()}
options := &AnnotateOptions{}
options.filenames = []string{"../../../examples/cassandra/cassandra.yaml"}
@@ -544,7 +544,7 @@ func TestAnnotateMultipleObjects(t *testing.T) {
}),
}
tf.Namespace = "test"
tf.ClientConfig = &client.Config{Version: testapi.Version()}
tf.ClientConfig = &client.Config{Version: testapi.Default.Version()}
options := &AnnotateOptions{}
options.all = true