Skip to content

Commit

Permalink
wip: debug tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Piccirello authored and nmanoogian committed Feb 14, 2024
1 parent d1e32b3 commit ebfe572
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions tests/e2e/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ set -euo pipefail

TEST_NAME="setup file"
TEST_CONFIG_DIR="./temp-config-dir"
export DOPPLER_PROJECT=""
export DOPPLER_CONFIG=""

cleanup() {
exit_code=$?
Expand Down Expand Up @@ -93,14 +95,14 @@ set timeout 2
set has_failed "1"
spawn $DOPPLER_BINARY setup --config-dir=$TEST_CONFIG_DIR 2>/dev/null
expect "Selected only available project: cli"
expect "Selected only available config: e2e"
spawn $DOPPLER_BINARY setup --config-dir=$TEST_CONFIG_DIR
expect {
"NAME" { set has_failed "0" }
eof {
# The spawn command has completed, print the output
puts \$expect_out(buffer)
}
}
if { \$has_failed == "1" } {
Expand Down Expand Up @@ -269,9 +271,9 @@ flags:
update-check: false
EOF
"$DOPPLER_BINARY" setup --config-dir=$TEST_CONFIG_DIR --no-interactive
[[ "$("$DOPPLER_BINARY" configure flags get analytics --plain)" == 'false' ]] || error "ERROR: setup not setting disabled value for analytics"
[[ "$("$DOPPLER_BINARY" configure flags get env-warning --plain)" == 'false' ]] || error "ERROR: setup not setting disabled value for env-warning"
[[ "$("$DOPPLER_BINARY" configure flags get update-check --plain)" == 'false' ]] || error "ERROR: setup not setting disabled value for update-check"
[[ "$("$DOPPLER_BINARY" configure flags get analytics --config-dir=$TEST_CONFIG_DIR --plain)" == 'false' ]] || error "ERROR: setup not setting disabled value for analytics"
[[ "$("$DOPPLER_BINARY" configure flags get env-warning --config-dir=$TEST_CONFIG_DIR --plain)" == 'false' ]] || error "ERROR: setup not setting disabled value for env-warning"
[[ "$("$DOPPLER_BINARY" configure flags get update-check --config-dir=$TEST_CONFIG_DIR --plain)" == 'false' ]] || error "ERROR: setup not setting disabled value for update-check"

afterEach

Expand Down

0 comments on commit ebfe572

Please sign in to comment.