mirror of https://github.com/k3s-io/k3s
30 lines
909 B
YAML
30 lines
909 B
YAML
![]() |
# kubectl create namespace edit-test
|
||
|
# kubectl create service clusterip svc1 --tcp 80 --namespace=edit-test --save-config
|
||
|
# kubectl edit service svc1 --namespace=edit-test --save-config=false
|
||
|
description: edit with flag --save-config=false should not update the annotation
|
||
|
mode: edit
|
||
|
args:
|
||
|
- service
|
||
|
- svc1
|
||
|
saveConfig: "false"
|
||
|
namespace: edit-test
|
||
|
expectedStdout:
|
||
|
- service "svc1" edited
|
||
|
expectedExitCode: 0
|
||
|
steps:
|
||
|
- type: request
|
||
|
expectedMethod: GET
|
||
|
expectedPath: /api/v1/namespaces/edit-test/services/svc1
|
||
|
expectedInput: 0.request
|
||
|
resultingStatusCode: 200
|
||
|
resultingOutput: 0.response
|
||
|
- type: edit
|
||
|
expectedInput: 1.original
|
||
|
resultingOutput: 1.edited
|
||
|
- type: request
|
||
|
expectedMethod: PATCH
|
||
|
expectedPath: /api/v1/namespaces/edit-test/services/svc1
|
||
|
expectedContentType: application/strategic-merge-patch+json
|
||
|
expectedInput: 2.request
|
||
|
resultingStatusCode: 200
|
||
|
resultingOutput: 2.response
|