mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
phase 2 of cassandra example overhaul
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user