Skip to content

Commit 4d7b4bb

Browse files
committed
fix(tests): replace bats run idiom in etcd e2e test
cozytest.sh does not implement the bats 'run <cmd>' helper and '$status' variable, so the 'Create Etcd with empty backup block (disabled by default)' test died with 'run: not found' on every attempt. Replace the bats idiom with plain shell: use '!' prefix and redirect stderr to assert the resources absent-when-backup-disabled invariant directly. Assisted-By: Claude <[email protected]> Signed-off-by: Aleksei Sviridkin <[email protected]>
1 parent 9fc99ee commit 4d7b4bb

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎hack/e2e-apps/etcd.bats‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,8 @@ EOF
6060
sleep 5
6161
kubectl -n tenant-test wait hr etcd --timeout=60s --for=condition=ready || { dump_diagnostics; false; }
6262
# With backup disabled, neither the schedule nor the secret should be created.
63-
run kubectl -n tenant-test get etcdbackupschedule.etcd.aenix.io etcd
64-
[ "$status" -ne 0 ]
65-
run kubectl -n tenant-test get secret etcd-s3-creds
66-
[ "$status" -ne 0 ]
63+
! kubectl -n tenant-test get etcdbackupschedule.etcd.aenix.io etcd 2>/dev/null
64+
! kubectl -n tenant-test get secret etcd-s3-creds 2>/dev/null
6765
}
6866

6967
@test "Create Etcd with backup schedule" {

0 commit comments

Comments
 (0)