From ddca12a688e35b5b086a4d0b02706c04721760ae Mon Sep 17 00:00:00 2001 From: Arie Peterson <arie@greenhost.nl> Date: Wed, 3 May 2023 15:22:41 +0200 Subject: [PATCH] Add tool to run cypress test in dev env --- tests/run.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 tests/run.sh diff --git a/tests/run.sh b/tests/run.sh new file mode 100755 index 00000000..e2f9bbb2 --- /dev/null +++ b/tests/run.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# This is a tool to run the cypress test from a development environment. It is +# not used in the CI. + +tag=138-add-cypress-scaffolding +host=https://dashboard.stackspin.net/ + +user="admin+cypress@stackspin.net" +password=$(pass stackspin/stackspin.net/cypress) + +if [ $1 == "--local" ] +then + echo "Using locally built docker image." + image=dashboard-cypress +else + echo "Using docker image from gitlab registry." + image=open.greenhost.net:4567/stackspin/dashboard/cypress-test:$tag +fi + +docker run -it --rm \ + -e CYPRESS_BASE_URL="$host" \ + -e CYPRESS_SSO_USER="$user" \ + -e CYPRESS_SSO_PASSWORD="$password" \ + $image -- GitLab