Skip to content

Commit 2ca0ebc

Browse files
committed
mount --device is not compatible, dropping tests as they add no value as we move to CDI
1 parent cf8d356 commit 2ca0ebc

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

tests/test_mount_hook.bats

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ setup() {
1212
"hook": {
1313
"path": "/scratch/local/podman-hooks/bin/mount_hook",
1414
"args": ["mount_hook",
15-
"--mount=type=bind,src=${HOME},dst=/mnt/hostbind,readonly",
16-
"--device=/dev/null:/dev/specialnull:rw",
17-
"--device=/dev/null:/dev/null:r"
15+
"--mount=type=bind,src=${HOME},dst=/mnt/hostbind,readonly"
1816
],
1917
"env": [
2018
"LDCONFIG_PATH=/sbin/ldconfig"
@@ -32,20 +30,9 @@ teardown() {
3230
rm -rf "${TMP_HOOKS_DIR}"
3331
}
3432

35-
@test "mount_hook binds directory and devices correctly" {
33+
@test "mount_hook binds directory" {
3634
run podman --hooks-dir "${TMP_HOOKS_DIR}" run --rm alpine sh -c "cat /mnt/hostbind/sarus-hook-test-file.txt"
3735
[ "$status" -eq 0 ]
3836
[ "$output" = "test-file" ]
3937
}
4038

41-
@test "remapped /dev/null behaves like /dev/null" {
42-
run podman --hooks-dir "${TMP_HOOKS_DIR}" run --rm alpine sh -c 'echo test >/dev/specialnull && echo OK'
43-
[ "$status" -eq 0 ]
44-
[ "$output" = "OK" ]
45-
}
46-
47-
@test "remapped /dev/zero behaves like /dev/zero" {
48-
run podman --hooks-dir "${TMP_HOOKS_DIR}" run --rm alpine sh -c 'head -c 4 /dev/newzero | hexdump -C'
49-
[[ "$output" =~ "00 00 00 00" ]]
50-
}
51-

0 commit comments

Comments
 (0)