From d90ac4c662c4c86f35d3f302e44831845917e028 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Mon, 14 Oct 2019 12:52:11 -0500 Subject: tests: Test mount execution with options --- tests/fixtures/0075-mount-options.installfile | 8 ++++++++ tests/spec/simulator.rb | 9 +++++++++ 2 files changed, 17 insertions(+) create mode 100644 tests/fixtures/0075-mount-options.installfile (limited to 'tests') 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 -- cgit v1.2.3-60-g2f50