From 1e7c28985d1b10349068e1c41c4aacbb08ccd383 Mon Sep 17 00:00:00 2001 From: Zvi Grinberg Date: Thu, 7 Mar 2024 10:09:42 +0200 Subject: [PATCH] test: add cli test for stack analysis summary option Signed-off-by: Zvi Grinberg --- integration/run_its.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/integration/run_its.sh b/integration/run_its.sh index ef67b62..150618d 100755 --- a/integration/run_its.sh +++ b/integration/run_its.sh @@ -101,6 +101,28 @@ fi echo "- PASSED" echo +echo 'RUNNING JavaScript CLI integration test for Stack Analysis report summary of snyk provider for Java Maven' + +testers/cli/node_modules/.bin/exhort-javascript-api stack scenarios/maven/pom.xml --summary > ./responses/stack-summary.json + +if [ "$?" -ne 0 ]; then + echo "- FAILED , return $RC from invocation" + cleanup $RC +fi + +RESPONSE_CONTENT=$(jq . ./responses/stack-summary.json) +if [ "$?" -ne 0 ]; then + echo "- FAILED , response is not a valid json" + cleanup $RC +fi +echo +echo $RESPONSE_CONTENT +echo "- PASSED" +echo + + + + echo "RUNNING JavaScript CLI integration test for Stack Analysis report in Json for Java Maven" testers/cli/node_modules/.bin/exhort-javascript-api stack scenarios/maven/pom.xml > ./responses/stack.json