From dcd84e63acbc7da7f5f5297cf056848cb8cdb37c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Wed, 18 Nov 2020 12:13:04 +0100 Subject: [PATCH] ci: use sudo test if the device is a block MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Permissions on the disk might changed due to the partitions being created. So the CI user is not able to read the device correctly. Closes: https://github.com/rook/rook/issues/6580 Signed-off-by: Sébastien Han --- tests/scripts/localPathPV.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/scripts/localPathPV.sh b/tests/scripts/localPathPV.sh index f40a9c2c4..a643b1bf8 100755 --- a/tests/scripts/localPathPV.sh +++ b/tests/scripts/localPathPV.sh @@ -9,12 +9,10 @@ fi db_device=$2 wal_device=$3 -lsblk +sudo lsblk + +sudo test ! -b "${test_scratch_device}" && echo "invalid scratch device, not a block device: ${test_scratch_device}" >&2 && exit 1 -if [ ! -b "${test_scratch_device}" ] ; then - echo "invalid scratch device, not a block device: ${test_scratch_device}" >&2 - exit 1 -fi sudo rm -rf /var/lib/rook/rook-integration-test sudo mkdir -p /var/lib/rook/rook-integration-test/mon1 /var/lib/rook/rook-integration-test/mon2 /var/lib/rook/rook-integration-test/mon3