Skip to content
Permalink
Browse files

Fix: SSH bats tests (#132)

* fix: get first alpine image

* Fix variable reference
  • Loading branch information...
patthiel committed Jul 29, 2019
1 parent f53c365 commit 02bba5d8a4fd0d5b5859c721b861726006a92697
Showing with 3 additions and 3 deletions.
  1. +1 −1 test/linodes/backups.bats
  2. +1 −1 test/ssh/distro-and-connection-check.bats
  3. +1 −1 test/ssh/ssh.bats
@@ -47,7 +47,7 @@ teardown() {
}

@test "it should enable backups" {
if [ "$TEST_ENVIRONMENT" = "dev" ] || [ $"TEST_ENVIRONMENT" = "test" ]; then
if [ "$TEST_ENVIRONMENT" = "dev" ] || [ "$TEST_ENVIRONMENT" = "test" ]; then
skip "Skipping backups tests"
fi

@@ -26,7 +26,7 @@ teardown() {
}

@test "it should create a linode and wait for it to be running" {
alpine_image=$(linode-cli images list --format "id" --text --no-headers | grep 'alpine')
alpine_image=$(linode-cli images list --format "id" --text --no-headers | grep 'alpine' | xargs | awk '{ print $1 }')
plan=$(linode-cli linodes types --text --no-headers --format="id" | xargs | awk '{ print $1 }')
ssh_key="$(cat ~/.ssh/id_rsa.pub)"
createLinodeAndWait "$alpine_image" "$plan" "$ssh_key"
@@ -40,7 +40,7 @@ teardown() {
}

@test "it should create a linode and wait for it to be running" {
alpine_image=$(linode-cli images list --format "id" --text --no-headers | grep 'alpine')
alpine_image=$(linode-cli images list --format "id" --text --no-headers | grep 'alpine' | xargs | awk '{ print $1 }')
plan=$(linode-cli linodes types --text --no-headers --format="id" | xargs | awk '{ print $1 }')
ssh_key="$(cat ~/.ssh/id_rsa.pub)"
createLinodeAndWait "$alpine_image" "$plan" "$ssh_key"

0 comments on commit 02bba5d

Please sign in to comment.
You can’t perform that action at this time.