From 2ecb1c0e5ba7a8b0029da0ae7c58984a24049dfd Mon Sep 17 00:00:00 2001 From: Todd Malsbary Date: Tue, 20 Oct 2020 12:20:26 -0700 Subject: Properly escape query string to jq Without this change, the '.request.release-name' query causes jq to get confused by the '-' and fail the test script: jq: error: name/0 is not defined at , line 1: .request.release-name jq: 1 compile error Issue-ID: MULTICLOUD-1241 Signed-off-by: Todd Malsbary Change-Id: I386cd46db8e44c92bc24d8eb8a9e3964d9b87d39 --- kud/tests/plugin_fw.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kud/tests/plugin_fw.sh b/kud/tests/plugin_fw.sh index a503d661..de9c12e2 100755 --- a/kud/tests/plugin_fw.sh +++ b/kud/tests/plugin_fw.sh @@ -124,9 +124,9 @@ print_msg "Retrieving VNF details" response="$(call_api "${base_url}/instance/${vnf_id}")" echo "$response" print_msg "Assert additional label has been assigned to rb instance" -test "$(jq -r .request.labels.testCaseName <<< "${response}")" == plugin_fw.sh +test "$(jq -r '.request.labels.testCaseName' <<< "${response}")" == plugin_fw.sh print_msg "Assert ReleaseName has been correctly overriden" -test "$(jq -r .request.release-name <<< "${response}")" == "${release_name}" +test "$(jq -r '.request."release-name"' <<< "${response}")" == "${release_name}" #Teardown print_msg "Deleting VNF Instance" -- cgit 1.2.3-korg