Skip to content

Commit

Permalink
fixup norunner testing for exploration of the command line installs
Browse files Browse the repository at this point in the history
  • Loading branch information
tomeichlersmith committed May 7, 2024
1 parent a76ce47 commit 4a05d42
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 28 deletions.
2 changes: 1 addition & 1 deletion ci/test
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ fi
for runner in ${runners}; do
_denv_info "Testing denv with '${runner}'"
if [ "${runner}" = "norunner" ]; then
DENV_RUNNER="${runner}" ./test/bats/bin/bats --filter "norunner" test/
DENV_RUNNER="${runner}" ./test/bats/bin/bats --filter-tags "norunner" test/
else
DENV_RUNNER="${runner}" ./test/bats/bin/bats test/
fi
Expand Down
58 changes: 31 additions & 27 deletions test/config.bats
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,6 @@ teardown() {
assert_output
}

@test "basic check run" {
run denv check
assert_output --partial "denv would run with '${DENV_RUNNER}'"
}

@test "quiet check run" {
run denv check --quiet
refute_output
}

@test "check fails when using unsupported runner" {
export DENV_RUNNER=dne
run -3 denv check
assert_output --partial "runner is not supported by denv"
}

@test "check that we are in a workspace" {
run denv check --workspace
assert_output --partial "Found denv_workspace"
}

@test "check that we are not in a workspace" {
rm -r .denv
run -4 denv check --workspace
assert_output --partial "Unable to deduce a denv workspace"
}

@test "print config" {
run denv config print
assert_line --index 0 "denv_workspace=\"${PWD}\""
Expand Down Expand Up @@ -81,3 +54,34 @@ teardown() {
denv config network off
assert_file_contains .denv/config '^denv_network="false"$'
}

# the rest do not support norunner
# bats file_tags=

@test "basic check run" {
run denv check
assert_output --partial "denv would run with '${DENV_RUNNER}'"
}

@test "quiet check run" {
run denv check --quiet
refute_output
}

@test "check fails when using unsupported runner" {
export DENV_RUNNER=dne
run -3 denv check
assert_output --partial "runner is not supported by denv"
}

@test "check that we are in a workspace" {
run denv check --workspace
assert_output --partial "Found denv_workspace"
}

@test "check that we are not in a workspace" {
rm -r .denv
run -4 denv check --workspace
assert_output --partial "Unable to deduce a denv workspace"
}

0 comments on commit 4a05d42

Please sign in to comment.