From 2f163304454c9b2e49ab5dc1267d2d7c71c66bee Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Fri, 26 Feb 2021 22:36:16 +0100 Subject: [PATCH] fix: use sudo differently - try to run the whole `drive` test in sudo instead of just individual commands --- test.sh | 2 +- tests/drive.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test.sh b/test.sh index 6c67396..0ae8624 100755 --- a/test.sh +++ b/test.sh @@ -1,4 +1,4 @@ #!/bin/bash tests/maas.sh -tests/drive.sh +sudo tests/drive.sh diff --git a/tests/drive.sh b/tests/drive.sh index 19aab95..cdc2f51 100755 --- a/tests/drive.sh +++ b/tests/drive.sh @@ -5,8 +5,8 @@ function test_partitioning() local img img=$(mktemp -u) dd if=/dev/zero of="$img" bs=1M seek=16384 count=0 - sudo setup_drive "$img" - sudo parted -ms "$img" -- print + setup_drive "$img" + parted -ms "$img" -- print rm -f "$img" }