diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-05-15 02:29:01 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-05-15 02:29:01 -0500 |
commit | 46af8229026a6122ca640f063c24d68876acdb11 (patch) | |
tree | 168f6993708f254a940dff521f52c03bb0aeb59a /tests/spec/simulator_spec.rb | |
parent | 5ae043001202cd064334c3c826ba3c4f656699ec (diff) | |
download | horizon-46af8229026a6122ca640f063c24d68876acdb11.tar.gz horizon-46af8229026a6122ca640f063c24d68876acdb11.tar.bz2 horizon-46af8229026a6122ca640f063c24d68876acdb11.tar.xz horizon-46af8229026a6122ca640f063c24d68876acdb11.zip |
hscript: Ensure user commands are correct in simulator
Diffstat (limited to 'tests/spec/simulator_spec.rb')
-rw-r--r-- | tests/spec/simulator_spec.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/spec/simulator_spec.rb b/tests/spec/simulator_spec.rb index 1206ab2..60e0186 100644 --- a/tests/spec/simulator_spec.rb +++ b/tests/spec/simulator_spec.rb @@ -335,29 +335,29 @@ printf '%s\\t%s\\t%s\\t%s\\t0\\t0\\n' /dev/gwyn/source /usr/src auto noatime >> it "creates the user account" do use_fixture '0082-username-basic.installfile' run_simulate - expect(last_command_started.stdout).to include('useradd -c "Adélie User" -m -U chris') - expect(last_command_started.stdout).to include('useradd -c "Adélie User" -m -U kayla') - expect(last_command_started.stdout).to include('useradd -c "Adélie User" -m -U meg') - expect(last_command_started.stdout).to include('useradd -c "Adélie User" -m -U steph') - expect(last_command_started.stdout).to include('useradd -c "Adélie User" -m -U amanda') + expect(last_command_started.stdout).to include('useradd -c "Adélie User" -m -R /target -U chris') + expect(last_command_started.stdout).to include('useradd -c "Adélie User" -m -R /target -U kayla') + expect(last_command_started.stdout).to include('useradd -c "Adélie User" -m -R /target -U meg') + expect(last_command_started.stdout).to include('useradd -c "Adélie User" -m -R /target -U steph') + expect(last_command_started.stdout).to include('useradd -c "Adélie User" -m -R /target -U amanda') end end context "simulating 'useralias' execution" do it "sets aliases on all named accounts" do use_fixture '0087-useralias-basic.installfile' run_simulate - expect(last_command_started.stdout).to include('usermod -c "Christopher" chris') - expect(last_command_started.stdout).to include('usermod -c "Kayla" kayla') - expect(last_command_started.stdout).to include('usermod -c "Meaghan" meg') - expect(last_command_started.stdout).to include('usermod -c "Stephanie" steph') - expect(last_command_started.stdout).to include('usermod -c "Amanda Jane" amanda') + expect(last_command_started.stdout).to include('usermod -c "Christopher" -R /target chris') + expect(last_command_started.stdout).to include('usermod -c "Kayla" -R /target kayla') + expect(last_command_started.stdout).to include('usermod -c "Meaghan" -R /target meg') + expect(last_command_started.stdout).to include('usermod -c "Stephanie" -R /target steph') + expect(last_command_started.stdout).to include('usermod -c "Amanda Jane" -R /target amanda') end end context "simulating 'userpw' execution" do it "sets the user's passphrase" do use_fixture '0091-userpw-basic.installfile' run_simulate - expect(last_command_started.stdout).to include("usermod -p '$6$UZJm/vBmVgyIdMZr$ppKEulz/HY0/e7RcXXujQbcqDXkUYgIqNEVPQJO6.le9kUpz8GvvRezY3ifqUUEwjhSo9tTOMG7lhqjn8gGpH0' awilfox") + expect(last_command_started.stdout).to include("usermod -p '$6$UZJm/vBmVgyIdMZr$ppKEulz/HY0/e7RcXXujQbcqDXkUYgIqNEVPQJO6.le9kUpz8GvvRezY3ifqUUEwjhSo9tTOMG7lhqjn8gGpH0' -R /target awilfox") end end context "simulating 'usergroups' execution" do |