Skip to content

Commit

Permalink
tests: check that we should not find /dev/disk/by-id/google*
Browse files Browse the repository at this point in the history
  • Loading branch information
HuijingHei committed Jun 27, 2023
1 parent 3df83e2 commit 83b68ad
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
16 changes: 16 additions & 0 deletions tests/kola/disks/device-link
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
## kola:
## platforms: qemu
## description: Verify no /dev/disk/by-id/*google* device links are found on non GCP.

# See https://issues.redhat.com/browse/OCPBUGS-13754

set -xeuo pipefail

. $KOLA_EXT_DATA/commonlib.sh

links=$(find /dev/disk/by-id/ -iname "*google*")
if [[ -n "${links:-}" ]]; then
fatal "Error: should not find /dev/disk/by-id/*google* device links on non GCP"
fi
ok "No /dev/disk/by-id/*google* device links are found on non GCP"
9 changes: 8 additions & 1 deletion tests/kola/var-mount/scsi-id/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
## platforms: qemu
## additionalDisks: ["5G:mpath"]
## description: Verify udev rules /dev/disk/by-id/scsi-* symlinks exist
## in initramfs.
## in initramfs, and should not find /dev/disk/by-id/google* device links
## on non GCP.

# See https://bugzilla.redhat.com/show_bug.cgi?id=1990506

Expand Down Expand Up @@ -39,3 +40,9 @@ if ! grep -q "63-scsi-sg3_symlink.rules" $tempfile; then
fi

rm -f $tempfile

# https://issues.redhat.com/browse/OCPBUGS-13754
links=$(find /dev/disk/by-id/ -name google*)
if [ -n "${links:-}" ]; then
fatal "Error: should not find /dev/disk/by-id/google* device links on non GCP"
fi

0 comments on commit 83b68ad

Please sign in to comment.