Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 1.3] [2.x] Adding placeholder to keep main/2.x/1.x consistent before #988 backports and disable windows video recording #1071

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions integtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -78,6 +82,11 @@ then
SECURITY_ENABLED="true"
fi

if [ -z "$REMOTE_CYPRESS_ENABLED" ]
then
REMOTE_CYPRESS_ENABLED="true"
fi

if [ -z "$CREDENTIAL" ]
then
CREDENTIAL="admin:admin"
Expand Down Expand Up @@ -106,7 +115,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"
Expand Down