Fix: Backport missing e2e/run-suite script for daggerbuild E2E system
The daggerbuild E2E system (used by OSS workflows) expects ./e2e/run-suite to exist, but we only backported the new E2E runner infrastructure. This script is needed for: - OSS workflow: 'go run ./pkg/build/e2e --suite=dashboards-suite' - Legacy Cypress configuration with video support - Integration between daggerbuild and existing Cypress test suites Resolves E2E test failures in OSS workflows where videos directory cannot be found because run-suite script was missing.
This commit is contained in:
+27
-6
@@ -26,10 +26,11 @@ declare -A env=(
|
||||
)
|
||||
|
||||
testFilesForSingleSuite="*.spec.ts"
|
||||
rootForEnterpriseSuite="./e2e/extensions-suite"
|
||||
rootForEnterpriseSuite="./e2e/extensions"
|
||||
rootForOldArch="./e2e/old-arch"
|
||||
rootForKubernetesDashboards="./e2e/dashboards-suite"
|
||||
rootForSearchDashboards="./e2e/dashboards-search-suite"
|
||||
rootForDashboardNewLayouts="./e2e/dashboard-new-layouts"
|
||||
|
||||
declare -A cypressConfig=(
|
||||
[screenshotsFolder]=./e2e/"${args[0]}"/screenshots
|
||||
@@ -44,6 +45,7 @@ declare -A cypressConfig=(
|
||||
[trashAssetsBeforeRuns]=false
|
||||
[reporter]=./e2e/log-reporter.js
|
||||
[baseUrl]=${BASE_URL:-"http://$HOST:$PORT"}
|
||||
[video]=${CYPRESS_VIDEO:-false}
|
||||
)
|
||||
|
||||
case "$1" in
|
||||
@@ -69,8 +71,6 @@ case "$1" in
|
||||
"enterprise")
|
||||
echo "Enterprise"
|
||||
env[SMTP_PLUGIN_ENABLED]=true
|
||||
CLEANUP="rm -rf ./e2e/extensions-suite"
|
||||
SETUP="cp -Lr ./e2e/extensions ./e2e/extensions-suite"
|
||||
enterpriseSuite=$(basename "${args[1]}")
|
||||
case "$2" in
|
||||
"debug")
|
||||
@@ -86,12 +86,11 @@ case "$1" in
|
||||
;;
|
||||
esac
|
||||
cypressConfig[specPattern]=$rootForEnterpriseSuite/$enterpriseSuite/*-suite/*.spec.ts
|
||||
$CLEANUP && $SETUP
|
||||
;;
|
||||
"")
|
||||
;;
|
||||
"old-arch")
|
||||
env[DISABLE_SCENES]=true
|
||||
env[dashboardScene]=false
|
||||
cypressConfig[specPattern]=$rootForOldArch/*/$testFilesForSingleSuite
|
||||
cypressConfig[video]=false
|
||||
case "$2" in
|
||||
@@ -111,7 +110,7 @@ case "$1" in
|
||||
"old-arch/"*)
|
||||
cypressConfig[specPattern]=./e2e/"${args[0]}"/$testFilesForSingleSuite
|
||||
cypressConfig[video]=${args[1]}
|
||||
env[DISABLE_SCENES]=true
|
||||
env[dashboardScene]=false
|
||||
;;
|
||||
"dashboards-schema-v2")
|
||||
env[kubernetesDashboards]=true
|
||||
@@ -149,6 +148,28 @@ case "$1" in
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"dashboard-new-layouts")
|
||||
env[kubernetesDashboards]=true
|
||||
env[dashboardNewLayouts]=true
|
||||
env[groupByVariable]=true
|
||||
cypressConfig[specPattern]=$rootForDashboardNewLayouts/$testFilesForSingleSuite
|
||||
cypressConfig[video]=false
|
||||
case "$2" in
|
||||
"debug")
|
||||
echo -e "Debug mode"
|
||||
env[SLOWMO]=1
|
||||
PARAMS="--no-exit"
|
||||
enterpriseSuite=$(basename "${args[2]}")
|
||||
;;
|
||||
"dev")
|
||||
echo "Dev mode"
|
||||
# remove comment to run in slomo ( demo mode )
|
||||
# env[SLOWMO]=1
|
||||
CMD="cypress open"
|
||||
enterpriseSuite=$(basename "${args[2]}")
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"enterprise-smtp")
|
||||
env[SMTP_PLUGIN_ENABLED]=true
|
||||
cypressConfig[specPattern]=./e2e/extensions/enterprise/smtp-suite/$testFilesForSingleSuite
|
||||
|
||||
Reference in New Issue
Block a user