test: moar integration tests [ci skip]
Some checks failed
continuous-integration/drone/pr Build is failing
Some checks failed
continuous-integration/drone/pr Build is failing
This commit is contained in:
43
tests/integration/app_errors.bats
Normal file
43
tests/integration/app_errors.bats
Normal file
@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
setup_file(){
|
||||
load "$PWD/tests/integration/helpers/common"
|
||||
_common_setup
|
||||
_add_server
|
||||
_new_app
|
||||
}
|
||||
|
||||
teardown_file(){
|
||||
_rm_server
|
||||
}
|
||||
|
||||
setup(){
|
||||
load "$PWD/tests/integration/helpers/common"
|
||||
_common_setup
|
||||
}
|
||||
|
||||
@test "validate app argument" {
|
||||
run $ABRA app errors
|
||||
assert_failure
|
||||
assert_output --partial 'no app provided'
|
||||
|
||||
run $ABRA app errors DOESNTEXIST
|
||||
assert_failure
|
||||
assert_output --partial 'cannot find app'
|
||||
}
|
||||
|
||||
@test "error if not deployed" {
|
||||
run $ABRA app errors "$TEST_APP_DOMAIN"
|
||||
assert_failure
|
||||
assert_output --partial 'is not deployed'
|
||||
}
|
||||
|
||||
# bats test_tags=slow
|
||||
@test "report errors" {
|
||||
_deploy_app
|
||||
|
||||
run $ABRA app errors "$TEST_APP_DOMAIN"
|
||||
assert_success
|
||||
|
||||
_undeploy_app
|
||||
}
|
Reference in New Issue
Block a user