summaryrefslogtreecommitdiff
diff options
authorMichael Vogt <mvo@ubuntu.com>2018-04-03 19:25:41 +0200
committerMichael Vogt <mvo@ubuntu.com>2018-04-03 20:01:32 +0200
commit5d54118e7abe89fa10cf3aec5ced3d69dd34ee21 (patch)
treef565ed9a1c2a53e006dd567be4b78b408bd12e54
parent89443385317d0d7a5dffbf85e5bf682d9a7c7848 (diff)
tests: fix snap-system-key test on coresystem-key-robustness
-rw-r--r--tests/main/snap-system-key/task.yaml5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/main/snap-system-key/task.yaml b/tests/main/snap-system-key/task.yaml
index b26abbd205..ae4d4fc9e9 100644
--- a/tests/main/snap-system-key/task.yaml
+++ b/tests/main/snap-system-key/task.yaml
@@ -1,10 +1,11 @@
summary: Ensure security profile re-generation works with system-key
prepare: |
echo "Make backup of fstab"
- cp /etc/fstab /etc/fstab.save
+ cp /etc/fstab /tmp/fstab.save
restore: |
echo "Restore fstab copy"
- mv /etc/fstab.save /etc/fstab
+ cp /tmp/fstab.save /etc/fstab
+ rm -f /tmp/fstab.save
execute: |
stop_snapd() {
systemctl stop snapd.service snapd.socket