tests: skip tests that require tty for github actions

This commit is contained in:
Jose Diaz-Gonzalez
2021-04-25 00:35:42 -04:00
parent de492a3aa1
commit fefed14b39
2 changed files with 6 additions and 0 deletions

View File

@@ -20,6 +20,9 @@ teardown() {
} }
@test "($PLUGIN_COMMAND_PREFIX:export) success with SSH_TTY" { @test "($PLUGIN_COMMAND_PREFIX:export) success with SSH_TTY" {
if [[ -n "$GITHUB_WORKFLOW" ]]; then
skip "No tty is available on Github Actions"
fi
export SSH_TTY=`tty` export SSH_TTY=`tty`
run dokku "$PLUGIN_COMMAND_PREFIX:export" l run dokku "$PLUGIN_COMMAND_PREFIX:export" l
echo "output: $output" echo "output: $output"

View File

@@ -24,6 +24,9 @@ teardown() {
} }
@test "($PLUGIN_COMMAND_PREFIX:import) error when data is not provided" { @test "($PLUGIN_COMMAND_PREFIX:import) error when data is not provided" {
if [[ -n "$GITHUB_WORKFLOW" ]]; then
skip "No tty is available on Github Actions"
fi
run dokku "$PLUGIN_COMMAND_PREFIX:import" l run dokku "$PLUGIN_COMMAND_PREFIX:import" l
assert_contains "${lines[*]}" "No data provided on stdin" assert_contains "${lines[*]}" "No data provided on stdin"
assert_failure assert_failure