Skip to content

Commit 10b000b

Browse files
committed
patch tests
1 parent ba3b530 commit 10b000b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tests/fixtures/setup-test-env.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ create_loop_device() {
8080
local loop_dev=$(losetup -f)
8181
losetup "$loop_dev" "$loop_file"
8282

83-
echo "$loop_dev"
8483
log_info "Loop device created: $loop_dev"
84+
echo "$loop_dev"
8585
}
8686

8787
# Create LUKS container on loop device
@@ -90,6 +90,15 @@ create_luks_container() {
9090

9191
log_info "Creating LUKS container on $loop_dev..."
9292

93+
# Verify device exists and is ready
94+
if [[ ! -b "$loop_dev" ]]; then
95+
log_error "Loop device $loop_dev does not exist or is not a block device"
96+
return 1
97+
fi
98+
99+
# Wait for device to be ready
100+
sleep 1
101+
93102
# Format as LUKS
94103
echo -n "$TEST_PASSWORD" | cryptsetup luksFormat --type luks2 "$loop_dev" -
95104

0 commit comments

Comments
 (0)