test: moar integration tests [ci skip]

This commit is contained in:
2023-09-07 18:50:25 +02:00
parent 7a9224b2b2
commit 0be532692d
112 changed files with 3412 additions and 1142 deletions

View File

@ -0,0 +1,60 @@
#!/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
}
@test "validate app argument" {
run $ABRA app run
assert_failure
assert_output --partial 'no app provided'
run $ABRA app run DOESNTEXIST
assert_failure
assert_output --partial 'cannot find app'
}
@test "error if missing service" {
run $ABRA app run "$TEST_APP_DOMAIN"
assert_failure
assert_output --partial 'no <service> provided'
run $ABRA app run "$TEST_APP_DOMAIN" app
assert_failure
assert_output --partial 'no <args> provided'
}
# 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'
_undeploy_app
}
# bats test_tags=slow
@test "run command" {
_deploy_app
run $ABRA app run "$TEST_APP_DOMAIN" app ls /
assert_success
assert_output --partial 'root'
_undeploy_app
}