kubernetes/pkg/kubectl/cmd/testdata/edit/testcase-repeat-error/test.yaml
Jordan Liggitt f86db18297
Add advanced 'kubectl edit' test scenarios
Add 'kubectl edit' testcase for saving a repeated error

Add 'kubectl edit' testcase for preserving an edited file with a syntax error

Add 'kubectl edit' testcase for recording command on list of objects
2017-02-14 14:50:45 -05:00

31 lines
838 B
YAML
Executable File

description: add a testcase description
mode: edit
args:
- service/kubernetes
namespace: default
expectedStderr:
- "services \"kubernetes\" is invalid"
- A copy of your changes has been stored
- Edit cancelled, no valid changes were saved
expectedExitCode: 1
steps:
- type: request
expectedMethod: GET
expectedPath: /api/v1/namespaces/default/services/kubernetes
expectedInput: 0.request
resultingStatusCode: 200
resultingOutput: 0.response
- type: edit
expectedInput: 1.original
resultingOutput: 1.edited
- type: request
expectedMethod: PATCH
expectedPath: /api/v1/namespaces/default/services/kubernetes
expectedContentType: application/strategic-merge-patch+json
expectedInput: 2.request
resultingStatusCode: 422
resultingOutput: 2.response
- type: edit
expectedInput: 3.original
resultingOutput: 3.edited