diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-19 14:01:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-19 14:01:45 +0300 |
commit | 9297025d0b7ddf095eb618dfaaab2ff8f2018d8b (patch) | |
tree | 865198c01d1824a9b098127baa3ab980c9cd2c06 /scripts/remote_development | |
parent | 6372471f43ee03c05a7c1f8b0c6ac6b8a7431dbe (diff) |
Add latest changes from gitlab-org/gitlab@16-7-stable-eev16.7.0-rc42
Diffstat (limited to 'scripts/remote_development')
-rwxr-xr-x | scripts/remote_development/run-e2e-tests.sh | 2 | ||||
-rwxr-xr-x | scripts/remote_development/run-smoke-test-suite.sh | 72 |
2 files changed, 59 insertions, 15 deletions
diff --git a/scripts/remote_development/run-e2e-tests.sh b/scripts/remote_development/run-e2e-tests.sh index 1c1fb07ea53..c46ce8b0926 100755 --- a/scripts/remote_development/run-e2e-tests.sh +++ b/scripts/remote_development/run-e2e-tests.sh @@ -12,7 +12,6 @@ DEFAULT_PASSWORD='5iveL!fe' export WEBDRIVER_HEADLESS="${WEBDRIVER_HEADLESS:-0}" -export QA_SUPER_SIDEBAR_ENABLED="${QA_SUPER_SIDEBAR_ENABLED:-1}" # This is currently necessary for the test to pass export GITLAB_USERNAME="${GITLAB_USERNAME:-root}" export GITLAB_PASSWORD="${GITLAB_PASSWORD:-${DEFAULT_PASSWORD}}" export DEVFILE_PROJECT="${DEVFILE_PROJECT:-Gitlab Org / Gitlab Shell}" @@ -20,7 +19,6 @@ export AGENT_NAME="${AGENT_NAME:-remotedev}" export TEST_INSTANCE_URL="${TEST_INSTANCE_URL:-http://gdk.test:3000}" echo "WEBDRIVER_HEADLESS: ${WEBDRIVER_HEADLESS}" -echo "QA_SUPER_SIDEBAR_ENABLED: ${QA_SUPER_SIDEBAR_ENABLED}" echo "GITLAB_USERNAME: ${GITLAB_USERNAME}" echo "DEVFILE_PROJECT: ${DEVFILE_PROJECT}" echo "AGENT_NAME: ${AGENT_NAME}" diff --git a/scripts/remote_development/run-smoke-test-suite.sh b/scripts/remote_development/run-smoke-test-suite.sh index 14c50678fba..24362b2359e 100755 --- a/scripts/remote_development/run-smoke-test-suite.sh +++ b/scripts/remote_development/run-smoke-test-suite.sh @@ -10,6 +10,10 @@ set -o errexit # AKA -e - exit immediately on errors (http://mywiki.wooledge.org/BashFAQ/105) +########### +## Setup ## +########### + # https://stackoverflow.com/a/28938235 BCyan='\033[1;36m' # Bold Cyan BRed='\033[1;31m' # Bold Red @@ -19,25 +23,67 @@ Color_Off='\033[0m' # Text Reset function onexit_err() { local exit_status=${1:-$?} - printf "\n❌❌❌ ${BRed}Remote Development specs failed!${Color_Off} ❌❌❌\n" + printf "\n❌❌❌ ${BRed}Remote Development smoke test failed!${Color_Off} ❌❌❌\n" + + if [ ${REVEAL_RUBOCOP_TODO} -ne 0 ]; then + printf "\n(If the failure was due to rubocop, set REVEAL_RUBOCOP_TODO=0 to ignore TODOs)\n" + fi + exit "${exit_status}" } trap onexit_err ERR set -o errexit -printf "${BCyan}" -printf "\nStarting Remote Development specs.\n\n" -printf "${Color_Off}" +##################### +## Invoke commands ## +##################### + +printf "${BCyan}\nStarting Remote Development smoke test...\n\n${Color_Off}" + +############# +## RUBOCOP ## +############# + +printf "${BBlue}Running RuboCop for Remote Development and related files${Color_Off}\n\n" + +# TODO: Also run rubocop for the other non-remote-development files once they are passing rubocop +# with REVEAL_RUBOCOP_TODO=1 +while IFS= read -r -d '' file; do + files_for_rubocop+=("$file") +done < <(find . -path './**/remote_development/*.rb' -print0) + +REVEAL_RUBOCOP_TODO=${REVEAL_RUBOCOP_TODO:-1} bundle exec rubocop --parallel --force-exclusion --no-server "${files_for_rubocop[@]}" + +########### +## RSPEC ## +########### + +printf "\n\n${BBlue}Running Remote Development and related backend RSpec specs${Color_Off}\n\n" + +while IFS= read -r file; do + files_for_rspec+=("$file") +done < <(find . -path './**/remote_development/*_spec.rb' | grep -v 'qa/qa') + +files_for_rspec+=( + "ee/spec/graphql/types/query_type_spec.rb" + "ee/spec/graphql/types/subscription_type_spec.rb" + "ee/spec/requests/api/internal/kubernetes_spec.rb" + "spec/graphql/types/subscription_type_spec.rb" + "spec/lib/result_spec.rb" + "spec/support_specs/matchers/result_matchers_spec.rb" +) +bin/rspec -r spec_helper "${files_for_rspec[@]}" + +########## +## JEST ## +########## + +printf "\n\n${BBlue}Running Remote Development frontend Jest specs${Color_Off}\n\n" -printf "${BBlue}Running Remote Development backend specs${Color_Off}\n\n" +yarn jest ee/spec/frontend/remote_development -bin/rspec -r spec_helper \ -$(find . -path './**/remote_development/*_spec.rb' | grep -v 'qa/qa') \ -ee/spec/graphql/types/query_type_spec.rb \ -ee/spec/graphql/types/subscription_type_spec.rb \ -ee/spec/requests/api/internal/kubernetes_spec.rb \ -spec/graphql/types/subscription_type_spec.rb \ -spec/lib/result_spec.rb \ -spec/support_specs/matchers/result_matchers_spec.rb +########################### +## Print success message ## +########################### printf "\n✅✅✅ ${BGreen}All Remote Development specs passed successfully!${Color_Off} ✅✅✅\n" |