Sentry/_unit-test/ensure-relay-credentials-test.sh
小草林(田梓萱) 90db12dfc0
Some checks failed
Lock closed issues/PRs / lock (push) Has been cancelled
Test / Sentry self-hosted end-to-end tests (push) Has been cancelled
Test / unit tests (push) Has been cancelled
Test / Sentry upgrade test (push) Has been cancelled
Test / integration test v2.19.0 - customizations disabled (push) Has been cancelled
Test / integration test v2.19.0 - customizations enabled (push) Has been cancelled
Test / integration test v2.26.0 - customizations disabled (push) Has been cancelled
Test / integration test v2.26.0 - customizations enabled (push) Has been cancelled
feat: sentry for arm
Signed-off-by: 小草林(田梓萱) <xcl@xuegao-tzx.top>
2025-01-11 23:13:34 +08:00

28 lines
745 B
Bash
Executable File

#!/usr/bin/env bash
source _unit-test/_test_setup.sh
source install/dc-detect-version.sh
# using _file format for these variables since there is a creds defined in dc-detect-version.sh
cfg_file=relay/config.yml
creds_file=relay/credentials.json
# Relay files don't exist in a clean clone.
test ! -f $cfg_file
test ! -f $creds_file
# Running the install script adds them.
source install/ensure-relay-credentials.sh
test -f $cfg_file
test -f $creds_file
test "$(jq -r 'keys[2]' "$creds_file")" = "secret_key"
# If the files exist we don't touch it.
echo GARBAGE >$cfg_file
echo MOAR GARBAGE >$creds_file
source install/ensure-relay-credentials.sh
test "$(cat $cfg_file)" = "GARBAGE"
test "$(cat $creds_file)" = "MOAR GARBAGE"
report_success