phase 2 of cassandra example overhaul

This commit is contained in:
Amy Unruh
2016-03-10 09:26:39 -08:00
parent d800dca7f8
commit 8846b313dc
9 changed files with 250 additions and 294 deletions

View File

@@ -333,7 +333,7 @@ func TestLabelForResourceFromFile(t *testing.T) {
switch req.Method {
case "GET":
switch req.URL.Path {
case "/namespaces/test/pods/cassandra":
case "/namespaces/test/replicationcontrollers/cassandra":
return &http.Response{StatusCode: 200, Body: objBody(codec, &pods.Items[0])}, nil
default:
t.Fatalf("unexpected request: %#v\n%#v", req.URL, req)
@@ -341,7 +341,7 @@ func TestLabelForResourceFromFile(t *testing.T) {
}
case "PATCH":
switch req.URL.Path {
case "/namespaces/test/pods/cassandra":
case "/namespaces/test/replicationcontrollers/cassandra":
return &http.Response{StatusCode: 200, Body: objBody(codec, &pods.Items[0])}, nil
default:
t.Fatalf("unexpected request: %#v\n%#v", req.URL, req)
@@ -359,7 +359,7 @@ func TestLabelForResourceFromFile(t *testing.T) {
buf := bytes.NewBuffer([]byte{})
cmd := NewCmdLabel(f, buf)
options := &LabelOptions{
Filenames: []string{"../../../examples/cassandra/cassandra.yaml"},
Filenames: []string{"../../../examples/cassandra/cassandra-controller.yaml"},
}
err := RunLabel(f, buf, cmd, []string{"a=b"}, options)