All checks were successful
continuous-integration/drone/push Build is passing
See toolshed/organising#650
57 lines
917 B
Bash
57 lines
917 B
Bash
#!/usr/bin/env bash
|
|
|
|
setup_file(){
|
|
load "$PWD/tests/integration/helpers/common"
|
|
_common_setup
|
|
_add_server
|
|
_new_app
|
|
}
|
|
|
|
teardown_file(){
|
|
_rm_app
|
|
_rm_server
|
|
}
|
|
|
|
setup(){
|
|
load "$PWD/tests/integration/helpers/common"
|
|
_common_setup
|
|
}
|
|
|
|
teardown(){
|
|
_undeploy_app
|
|
}
|
|
|
|
@test "validate app argument" {
|
|
run $ABRA app run
|
|
assert_failure
|
|
|
|
run $ABRA app run DOESNTEXIST
|
|
assert_failure
|
|
}
|
|
|
|
@test "error if missing service" {
|
|
run $ABRA app run "$TEST_APP_DOMAIN"
|
|
assert_failure
|
|
|
|
run $ABRA app run "$TEST_APP_DOMAIN" app
|
|
assert_failure
|
|
}
|
|
|
|
# bats test_tags=slow
|
|
@test "error if service doesn't exist" {
|
|
_deploy_app
|
|
|
|
run $ABRA app run "$TEST_APP_DOMAIN" DOESNTEXIST ls
|
|
assert_failure
|
|
assert_output --partial 'no containers matching'
|
|
}
|
|
|
|
# bats test_tags=slow
|
|
@test "run command" {
|
|
_deploy_app
|
|
|
|
run $ABRA app run "$TEST_APP_DOMAIN" app -- ls /
|
|
assert_success
|
|
assert_output --partial 'root'
|
|
}
|