From ca4ade7557f01d1fee7782f6e3c80c0c86e63314 Mon Sep 17 00:00:00 2001 From: merwanehamadi Date: Mon, 11 Sep 2023 15:42:05 -0700 Subject: [PATCH] Remove report.html and use cli tool instead (#59) --- testing_suite/test.sh | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/testing_suite/test.sh b/testing_suite/test.sh index ec9c56b..9ffa0b4 100644 --- a/testing_suite/test.sh +++ b/testing_suite/test.sh @@ -19,12 +19,6 @@ if ! command -v newman &> /dev/null; then npm install -g newman fi -if ! command -v newman-reporter-htmlextra &> /dev/null; then - echo "newman-reporter-htmlextra is not found. Installing..." - npm install -g newman-reporter-htmlextra -fi - - # Inform the user that the process may take some time cat << "EOF" @@ -52,23 +46,10 @@ EOF newman run https://raw.githubusercontent.com/e2b-dev/agent-protocol/main/testing_suite/contract_tests.json \ -e https://raw.githubusercontent.com/e2b-dev/agent-protocol/main/testing_suite/contract_tests_env.json \ --env-var "env-openapi-json-url=https://raw.githubusercontent.com/e2b-dev/agent-protocol/main/schemas/openapi.json" \ --r htmlextra \ ---env-var "env-server=Test server" \ --r htmlextra \ ---reporter-htmlextra-export report.html \ ---reporter-htmlextra-title "Agent Protocol Contract Testing" +--env-var "env-server=Test server" agent_protocol_contract_testing_results=$? - -if [[ "$OSTYPE" == "darwin"* ]]; then - opener="open" -elif [[ "$OSTYPE" == "linux-gnu"* ]]; then - opener="xdg-open" -fi - -$opener report.html || echo "couldn't open the report. You can open it yourself in your favorite browser. The report is located in the current directory and named report.html" - if [[ $agent_protocol_tests_results -ne 0 ]] || [[ $agent_protocol_contract_testing_results -ne 0 ]]; then exit 1 else