From bce4c7ee81bdee8e4fe3b1cf254b1b3f43779a9a Mon Sep 17 00:00:00 2001 From: Pauline Ribeyre <4224001+paulineribeyre@users.noreply.github.com> Date: Thu, 15 Jul 2021 16:32:10 -0500 Subject: [PATCH 1/3] getServiceVersion: handle service names with dash --- run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-tests.sh b/run-tests.sh index 7578bc3db..7c5785d4d 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -40,7 +40,7 @@ getServiceVersion() { local command local response local version - command="g3kubectl get configmap manifest-versions -o json | jq -r .data.json | jq -r .$1" + command="g3kubectl get configmap manifest-versions -o json | jq -r .data.json | jq -r '.[\"$1\"]'" response=$(eval "$command") # Get last item of delimited string using string operators: From 78940f227951266017c08fb2002a2a6d7f4fe211 Mon Sep 17 00:00:00 2001 From: Marcelo Costa Date: Thu, 15 Jul 2021 17:14:32 -0500 Subject: [PATCH 2/3] apply proper quotes for string interpolation --- run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-tests.sh b/run-tests.sh index 7c5785d4d..3884a6b67 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -40,7 +40,7 @@ getServiceVersion() { local command local response local version - command="g3kubectl get configmap manifest-versions -o json | jq -r .data.json | jq -r '.[\"$1\"]'" + command="g3kubectl get configmap manifest-versions -o json | jq -r .data.json | jq -r "'".[\"$s\"]"'"" response=$(eval "$command") # Get last item of delimited string using string operators: From 612d2233a574e80e64d917535548e55f6d282794 Mon Sep 17 00:00:00 2001 From: Marcelo Costa Date: Thu, 15 Jul 2021 17:15:13 -0500 Subject: [PATCH 3/3] fix function arg reference --- run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-tests.sh b/run-tests.sh index 3884a6b67..90aeb4bf5 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -40,7 +40,7 @@ getServiceVersion() { local command local response local version - command="g3kubectl get configmap manifest-versions -o json | jq -r .data.json | jq -r "'".[\"$s\"]"'"" + command="g3kubectl get configmap manifest-versions -o json | jq -r .data.json | jq -r "'".[\"$1\"]"'"" response=$(eval "$command") # Get last item of delimited string using string operators: