Files
dokku/tests/unit/run_1.bats
Jose Diaz-Gonzalez 618158a0f3 refactor: deprecate the --rm and --rm-container flags
These flags are not commonly invoked by users, causing issues when cleaning up old containers. Rather than instruct users to use some random flag, just change the default to what is likely to be more common.
2021-07-27 02:58:19 -04:00

41 lines
898 B
Bash

#!/usr/bin/env bats
load test_helper
setup() {
global_setup
create_app
}
teardown() {
destroy_app
global_teardown
}
@test "(run) run:help" {
run /bin/bash -c "dokku run:help"
echo "output: $output"
echo "status: $status"
assert_output_contains "Run a one-off process inside a container"
}
@test "(run) run (with --options)" {
deploy_app
run /bin/bash -c "dokku --force --quiet run $TEST_APP python -V"
echo "output: $output"
echo "status: $status"
assert_success
}
@test "(run) run (with --env / -e)" {
deploy_app
run /bin/bash -c "dokku run --env TEST=testvalue -e TEST2=testvalue2 $TEST_APP env | grep -E '^TEST=testvalue'"
echo "output: $output"
echo "status: $status"
run /bin/bash -c "dokku run --env TEST=testvalue -e TEST2=testvalue2 $TEST_APP env | grep -E '^TEST2=testvalue2'"
echo "output: $output"
echo "status: $status"
assert_success
}