Skip to content

Commit

Permalink
fixup! test: update deployed envs e2e test to latest sdk version
Browse files Browse the repository at this point in the history
  • Loading branch information
iccicci committed Oct 4, 2024
1 parent e816298 commit ee31c8d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 14 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/test-deploy-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ on:
type: choice
required: true
options:
- live-preprod
- live-preview
- dev-preprod
- dev-preview
- staging-preprod
- 'dev'
- 'staging'
- 'live'
network:
description: 'Target network'
type: choice
Expand Down
35 changes: 26 additions & 9 deletions packages/e2e/src/scripts/generate-dotenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,44 @@

set -e
set -x
set -o

case $2 in
target="${ENVIRONMENT}-${NETWORK}"

case $CLUSTER in
any)
environment="$1"
environment="${target}"
;;
*)
environment="$1.$2"
environment="${target}.${CLUSTER}"
;;
esac

case $NETWORK in
preprod)
networkMagic=1
;;
preview)
networkMagic=2
;;
sanchonet)
networkMagic=4
;;
*)
echo "${NETWORK}: Unknown network"
exit 1
;;
esac

echo $environment
echo $networkMagic

domain="${environment}.lw.iog.io"
url="https://${domain}/"

# Construct the environment file content
envFileContent="
# Logger
LOGGER_MIN_SEVERITY=info
# Key management setup - required by getWallet
KEY_MANAGEMENT_PROVIDER=inMemory
# Providers setup - required by getWallet
TEST_CLIENT_ASSET_PROVIDER=http
TEST_CLIENT_ASSET_PROVIDER_PARAMS='{\"baseUrl\":\"${url}\"}'
Expand All @@ -42,7 +58,8 @@ TEST_CLIENT_UTXO_PROVIDER_PARAMS='{\"baseUrl\":\"${url}\"}'
TEST_CLIENT_STAKE_POOL_PROVIDER=http
TEST_CLIENT_STAKE_POOL_PROVIDER_PARAMS='{\"baseUrl\":\"${url}\"}'
WS_PROVIDER_URL='wss://${domain}/ws'
"
KEY_MANAGEMENT_PROVIDER=inMemory"

# Write the environment file content to the specified file
echo "$envFileContent" > .env

0 comments on commit ee31c8d

Please sign in to comment.