summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-14 13:50:48 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-14 13:50:48 -0500
commit111396c11d841ae7fd63c85b85c4219e151eaeff (patch)
tree1270d1da40e4fa746a9e5d4428c19fc0d28d73c9 /tests
parent593301e2a40119d4861a6167cf808187ae255035 (diff)
downloadhorizon-111396c11d841ae7fd63c85b85c4219e151eaeff.tar.gz
horizon-111396c11d841ae7fd63c85b85c4219e151eaeff.tar.bz2
horizon-111396c11d841ae7fd63c85b85c4219e151eaeff.tar.xz
horizon-111396c11d841ae7fd63c85b85c4219e151eaeff.zip
tests: Include fstab output in mount tests
Diffstat (limited to 'tests')
-rw-r--r--tests/spec/simulator.rb17
1 files changed, 13 insertions, 4 deletions
diff --git a/tests/spec/simulator.rb b/tests/spec/simulator.rb
index 1b51b9d..013a3ec 100644
--- a/tests/spec/simulator.rb
+++ b/tests/spec/simulator.rb
@@ -37,20 +37,29 @@ RSpec.describe 'HorizonScript Simulator', :type => :aruba do
it "mounts directories in tree order" do
use_fixture '0057-many-mounts.installfile'
run_simulate
- expect(last_command_started.stdout).to include("
-mount /dev/sda1 /target/
+ expect(last_command_started.stdout).to include("mount /dev/sda1 /target/
+mkdir -p /target/etc
+printf '%s\\t%s\\t%s\\t%s\\t0\\t1\\n' /dev/sda1 / auto defaults >> /target/etc/fstab
mount /dev/gwyn/home /target/home
+printf '%s\\t%s\\t%s\\t%s\\t0\\t0\\n' /dev/gwyn/home /home auto defaults >> /target/etc/fstab
mount /dev/sda2 /target/usr
-mount /dev/gwyn/source /target/usr/src")
+printf '%s\\t%s\\t%s\\t%s\\t0\\t0\\n' /dev/sda2 /usr auto defaults >> /target/etc/fstab
+mount /dev/gwyn/source /target/usr/src
+printf '%s\\t%s\\t%s\\t%s\\t0\\t0\\n' /dev/gwyn/source /usr/src auto defaults >> /target/etc/fstab")
end
it "handles options correctly" do
use_fixture '0075-mount-options.installfile'
run_simulate
expect(last_command_started.stdout).to include("
mount /dev/sda1 /target/
+mkdir -p /target/etc
+printf '%s\\t%s\\t%s\\t%s\\t0\\t1\\n' /dev/sda1 / auto defaults >> /target/etc/fstab
mount -o relatime /dev/gwyn/home /target/home
+printf '%s\\t%s\\t%s\\t%s\\t0\\t0\\n' /dev/gwyn/home /home auto relatime >> /target/etc/fstab
mount /dev/sda2 /target/usr
-mount -o noatime /dev/gwyn/source /target/usr/src")
+printf '%s\\t%s\\t%s\\t%s\\t0\\t0\\n' /dev/sda2 /usr auto defaults >> /target/etc/fstab
+mount -o noatime /dev/gwyn/source /target/usr/src
+printf '%s\\t%s\\t%s\\t%s\\t0\\t0\\n' /dev/gwyn/source /usr/src auto noatime >> /target/etc/fstab")
end
end
context "simulating 'hostname' execution" do