diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-14 12:52:11 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-14 12:52:11 -0500 |
commit | d90ac4c662c4c86f35d3f302e44831845917e028 (patch) | |
tree | ed37cdd933a0150e18e6c30157d66eb0c71f3285 | |
parent | 3c151b8fc928bc28a190f4a2e58d04981dc509e3 (diff) | |
download | horizon-d90ac4c662c4c86f35d3f302e44831845917e028.tar.gz horizon-d90ac4c662c4c86f35d3f302e44831845917e028.tar.bz2 horizon-d90ac4c662c4c86f35d3f302e44831845917e028.tar.xz horizon-d90ac4c662c4c86f35d3f302e44831845917e028.zip |
tests: Test mount execution with options
-rw-r--r-- | tests/fixtures/0075-mount-options.installfile | 8 | ||||
-rw-r--r-- | tests/spec/simulator.rb | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/fixtures/0075-mount-options.installfile b/tests/fixtures/0075-mount-options.installfile new file mode 100644 index 0000000..bb21b0c --- /dev/null +++ b/tests/fixtures/0075-mount-options.installfile @@ -0,0 +1,8 @@ +network false +hostname test.machine +pkginstall adelie-base +rootpw $6$gumtLGmHwOVIRpQR$2M9PUO24hy5mofzWWf9a.YLbzOgOlUby1g0hDj.wG67E2wrrvys59fq02PPdxBdbgkLZFtjfEx6MHZwMBamwu/ +mount /dev/gwyn/home /home relatime +mount /dev/gwyn/source /usr/src noatime +mount /dev/sda1 / +mount /dev/sda2 /usr diff --git a/tests/spec/simulator.rb b/tests/spec/simulator.rb index d3d8afa..1b51b9d 100644 --- a/tests/spec/simulator.rb +++ b/tests/spec/simulator.rb @@ -43,6 +43,15 @@ mount /dev/gwyn/home /target/home mount /dev/sda2 /target/usr mount /dev/gwyn/source /target/usr/src") 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/ +mount -o relatime /dev/gwyn/home /target/home +mount /dev/sda2 /target/usr +mount -o noatime /dev/gwyn/source /target/usr/src") + end end context "simulating 'hostname' execution" do it "sets the hostname properly" do |