Fix tests using kubectl convert
hack/make-rules/test-cmd.sh script fails with tariling errors. Error: unknown command "convert" for "kubectl" 1. This PR fixes the errors by replacing or removing the use of "kubectl convert" option because it was already removed. 2. Fix trailing shell check failure as well. In ./test/cmd/generic-resources.sh line 366: kube::test::get_object_assert deployment "{{range.items}}{{$image_field0}}:{{end}}" "${IMAGE_NGINX}:${IMAGE_NGINX}:"
This commit is contained in:
@@ -62,10 +62,6 @@ run_template_output_tests() {
|
||||
output_message=$(kubectl "${kube_flags[@]:?}" expose -f hack/testdata/redis-slave-replicaset.yaml --save-config --port=80 --target-port=8000 --dry-run=client --template="{{ .metadata.name }}:")
|
||||
kube::test::if_has_string "${output_message}" 'redis-slave:'
|
||||
|
||||
# check that convert command supports --template output
|
||||
output_message=$(kubectl convert "${kube_flags[@]:?}" -f hack/testdata/deployment-revision1.yaml --output-version=apps/v1beta1 --template="{{ .metadata.name }}:")
|
||||
kube::test::if_has_string "${output_message}" 'nginx:'
|
||||
|
||||
# check that run command supports --template output
|
||||
output_message=$(kubectl "${kube_flags[@]:?}" run --dry-run=client --template="{{ .metadata.name }}:" pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'print bpi(2000)')
|
||||
kube::test::if_has_string "${output_message}" 'pi:'
|
||||
|
Reference in New Issue
Block a user