Skip to content

Commit 3954e07

Browse files
committed
bug: Make tests more durable
Tests regularly fail, delaying CLI releases, because there are other Volumes on the test account, and commands referencing a `$volume_id` are given a list of IDs instead of just the one they expect. This change sets `$volume_id` to a single Volume's ID, which should allow tests to continue even if there are unexpected volumes on the account.
1 parent 7140329 commit 3954e07

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

test/volumes/list-view-update-volumes.bats

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ load '../common'
1212
setup() {
1313
suiteName="list-view-update-volumes"
1414
setToken "$suiteName"
15-
export volume_id=$(linode-cli volumes list --text --no-headers --delimiter="," --format="id")
15+
# we only want a single volume id, so if there are more volumes on the account, just look at the first one
16+
export volume_id=$(linode-cli volumes list --text --no-headers --delimiter="," --format="id" | head -n1)
1617
}
1718

1819
teardown() {
@@ -24,10 +25,6 @@ teardown() {
2425
fi
2526
}
2627

27-
@test "remove volumes prior to tests" {
28-
run removeVolumes
29-
}
30-
3128
@test "it should list volumes" {
3229
run createVolume
3330
run linode-cli volumes list \

0 commit comments

Comments
 (0)