From 46af8229026a6122ca640f063c24d68876acdb11 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Fri, 15 May 2020 02:29:01 -0500 Subject: hscript: Ensure user commands are correct in simulator --- tests/spec/simulator_spec.rb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'tests') 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 -- cgit v1.2.3-60-g2f50