forked from toolshed/abra
test: fixes for test suite post-cobra migrate
See toolshed/organising#650
This commit is contained in:
@ -24,32 +24,12 @@ teardown(){
|
||||
_undeploy_app
|
||||
}
|
||||
|
||||
# bats test_tags=slow
|
||||
@test "autocomplete" {
|
||||
run $ABRA app cmd --generate-bash-completion
|
||||
assert_success
|
||||
assert_output "$TEST_APP_DOMAIN"
|
||||
|
||||
run $ABRA app cmd "$TEST_APP_DOMAIN" --generate-bash-completion
|
||||
assert_success
|
||||
assert_output "app"
|
||||
|
||||
run $ABRA app cmd "$TEST_APP_DOMAIN" app --generate-bash-completion
|
||||
assert_success
|
||||
assert_output "test_cmd
|
||||
test_cmd_arg
|
||||
test_cmd_args
|
||||
test_cmd_export"
|
||||
}
|
||||
|
||||
@test "validate app argument" {
|
||||
run $ABRA app cmd
|
||||
assert_failure
|
||||
assert_output --partial 'no app provided'
|
||||
|
||||
run $ABRA app cmd DOESNTEXIST
|
||||
assert_failure
|
||||
assert_output --partial 'cannot find app'
|
||||
}
|
||||
|
||||
@test "retrieve recipe if missing" {
|
||||
@ -123,13 +103,11 @@ test_cmd_export"
|
||||
@test "error if missing arguments without passing --local" {
|
||||
run $ABRA app cmd "$TEST_APP_DOMAIN"
|
||||
assert_failure
|
||||
assert_output --partial 'missing arguments'
|
||||
}
|
||||
|
||||
@test "error if missing arguments when passing --local" {
|
||||
run $ABRA app cmd --local "$TEST_APP_DOMAIN"
|
||||
assert_failure
|
||||
assert_output --partial 'missing arguments'
|
||||
}
|
||||
|
||||
@test "cannot use --local and --user at same time" {
|
||||
@ -162,17 +140,13 @@ test_cmd_export"
|
||||
}
|
||||
|
||||
@test "run command with single arg" {
|
||||
skip "https://git.coopcloud.tech/coop-cloud/organising/issues/581"
|
||||
|
||||
run $ABRA app cmd --local "$TEST_APP_DOMAIN" test_cmd_arg -- bing
|
||||
assert_success
|
||||
assert_output --partial 'bing'
|
||||
}
|
||||
|
||||
@test "run command with several args" {
|
||||
skip "https://git.coopcloud.tech/coop-cloud/organising/issues/581"
|
||||
|
||||
run $ABRA app cmd --local "$TEST_APP_DOMAIN" test_cmd_args -- bong bang
|
||||
run $ABRA app cmd --local "$TEST_APP_DOMAIN" test_cmd_args bong bang
|
||||
assert_success
|
||||
assert_output --partial 'bong bang'
|
||||
}
|
||||
|
Reference in New Issue
Block a user