summaryrefslogtreecommitdiff
path: root/tests/spec/simulator_spec.rb
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-05-15 02:29:01 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-05-15 02:29:01 -0500
commit46af8229026a6122ca640f063c24d68876acdb11 (patch)
tree168f6993708f254a940dff521f52c03bb0aeb59a /tests/spec/simulator_spec.rb
parent5ae043001202cd064334c3c826ba3c4f656699ec (diff)
downloadhorizon-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.rb22
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