From b10f8d5554099c102ad35e642ae54183a32e95f3 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Tue, 6 Feb 2024 14:35:25 -0500 Subject: [PATCH 1/2] [2.x] Adding placeholder to keep main/2.x/1.x consistent before #988 backports Signed-off-by: Peter Zhu --- integtest.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/integtest.sh b/integtest.sh index cd97c1da7..72468c606 100644 --- a/integtest.sh +++ b/integtest.sh @@ -19,11 +19,12 @@ function usage() { echo -e "-t TEST_COMPONENTS\t(OpenSearch-Dashboards reportsDashboards etc.), optional, specify test components, separate with space, else test everything." echo -e "-v VERSION\t, no defaults, indicates the OpenSearch version to test." echo -e "-o OPTION\t, no defaults, determine the TEST_TYPE value among(default, manifest) in test_finder.sh, optional." + echo -e "-r REMOTE_CYPRESS_ENABLED\t(true | false), defaults to true. Feature flag set to specify remote cypress orchestrator runs are enabled or not." echo -e "-h\tPrint this message." echo "--------------------------------------------------------------------------" } -while getopts ":hb:p:s:c:t:v:o:" arg; do +while getopts ":hb:p:s:c:t:v:o:r:" arg; do case $arg in h) usage @@ -50,6 +51,9 @@ while getopts ":hb:p:s:c:t:v:o:" arg; do o) OPTION=$OPTARG ;; + r) + REMOTE_CYPRESS_ENABLED=$OPTARG + ;; :) echo "-${OPTARG} requires an argument" usage @@ -78,6 +82,11 @@ then SECURITY_ENABLED="true" fi +if [ -z "$REMOTE_CYPRESS_ENABLED" ] +then + REMOTE_CYPRESS_ENABLED="true" +fi + if [ -z "$CREDENTIAL" ] then # Starting in 2.12.0, security demo configuration script requires an initial admin password @@ -115,4 +124,4 @@ then else echo "run security disabled tests" yarn cypress:run-without-security --browser "$BROWSER_PATH" --spec "$TEST_FILES" -fi \ No newline at end of file +fi From fcc81cf151f08e91e487e2dc88e6576175d606cf Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Tue, 6 Feb 2024 14:39:43 -0500 Subject: [PATCH 2/2] Add more Signed-off-by: Peter Zhu --- integtest.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/integtest.sh b/integtest.sh index 72468c606..2a4499726 100644 --- a/integtest.sh +++ b/integtest.sh @@ -117,7 +117,15 @@ echo "BROWSER_PATH: $BROWSER_PATH" # # We need to ensure the cypress tests are the last execute process to # the error code gets passed to the CI. -if [ $SECURITY_ENABLED = "true" ] + +if [ "$OSTYPE" = "msys" ] || [ "$OSTYPE" = "cygwin" ] || [ "$OSTYPE" = "win32" ]; then + echo "Disable video recording in Windows due to ffmpeg missing libs in Windows Docker Container" + echo "TODO: https://github.com/opensearch-project/opensearch-dashboards-functional-test/issues/1068" + jq '. + {"video": false}' cypress.json > cypress_new.json # jq does not allow reading and writing on same file + mv -v cypress_new.json cypress.json +fi + +if [ "$SECURITY_ENABLED" = "true" ] then echo "run security enabled tests" yarn cypress:run-with-security --browser "$BROWSER_PATH" --spec "$TEST_FILES"