Skip to content
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
1 change: 1 addition & 0 deletions deploy/devsandbox-dashboard/ui-e2e-tests/app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ auth:
signInPage: oidc

sandbox:
environment: DEV
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify expected casing for sandbox environment values in this repo.
# Expected: either consistent usage of DEV everywhere, or explicit normalization/allowlist including DEV.

set -euo pipefail

echo "== app-config values =="
fd 'app-config\.ya?ml$' | xargs -r rg -n -C2 '^\s*sandbox:\s*$|^\s*environment:\s*(DEV|dev)\s*$'

echo
echo "== references to sandbox.environment in code/tests =="
rg -n -C3 'sandbox\.environment|environment.*(DEV|dev)|\bDEV\b|\bdev\b' --type-add 'yaml:*.yaml' --type-add 'yml:*.yml'

echo
echo "== linked env literals near config handling =="
rg -n -C3 '(ENV|environment).*(===|==|includes|match|toLowerCase|toUpperCase)'

Repository: codeready-toolchain/toolchain-e2e

Length of output: 50390


Change environment: DEV to environment: dev to match test setup expectations.

Test setup code in testsupport/devsandbox-dashboard/setup.go defines DevEnv = "dev" and uses an exact string comparison (if env == DevEnv) to determine test behavior. Using uppercase DEV will fail this check, preventing the cookie consent handling from executing during tests.

Suggested fix
 sandbox:
-  environment: DEV
+  environment: dev
   signupAPI: ${REGISTRATION_SERVICE_API}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@deploy/devsandbox-dashboard/ui-e2e-tests/app-config.yaml` at line 87, Change
the environment value from the uppercase string "DEV" to the lowercase "dev" so
it matches the test constant DevEnv used in
testsupport/devsandbox-dashboard/setup.go (DevEnv = "dev") and allows the exact
string comparison (if env == DevEnv) to succeed; update the environment: DEV
entry to environment: dev wherever the config is set.

signupAPI: ${REGISTRATION_SERVICE_API}
kubeAPI: ${HOST_OPERATOR_API}
recaptcha:
Expand Down
Loading