mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-13 05:02:50 +00:00
Fix kubectl edit: no such file
This commit is contained in:
@@ -574,7 +574,7 @@ __EOF__
|
||||
## kubectl edit can update the image field of a POD. tmp-editor.sh is a fake editor
|
||||
echo -e '#!/bin/bash\nsed -i "s/nginx/gcr.io\/google_containers\/serve_hostname/g" $1' > /tmp/tmp-editor.sh
|
||||
chmod +x /tmp/tmp-editor.sh
|
||||
EDITOR=/tmp/tmp-editor.sh kubectl edit "${kube_flags[@]}" pods/valid-pod
|
||||
EDITOR=/tmp/tmp-editor.sh ${KUBE_OUTPUT_HOSTBIN}/kubectl edit "${kube_flags[@]}" pods/valid-pod
|
||||
# Post-condition: valid-pod POD has image gcr.io/google_containers/serve_hostname
|
||||
kube::test::get_object_assert pods "{{range.items}}{{$image_field}}:{{end}}" 'gcr.io/google_containers/serve_hostname:'
|
||||
# cleaning
|
||||
|
Reference in New Issue
Block a user