summaryrefslogtreecommitdiff
path: root/tests/spec/validator_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tests/spec/validator_spec.rb')
-rw-r--r--tests/spec/validator_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/spec/validator_spec.rb b/tests/spec/validator_spec.rb
index 3a491a0..8f33330 100644
--- a/tests/spec/validator_spec.rb
+++ b/tests/spec/validator_spec.rb
@@ -732,6 +732,19 @@ RSpec.describe 'HorizonScript validation', :type => :aruba do
expect(last_command_started).to have_output(/error: .*version.*/)
end
end
+ context "for 'rootshell' key" do
+ it "succeeds with zsh" do
+ use_fixture '0265-rootshell-basic.installfile'
+ run_validate
+ expect(last_command_started).to have_output(PARSER_SUCCESS)
+ expect(last_command_started).to have_output(VALIDATOR_SUCCESS)
+ end
+ it "fails with an invalid shell" do
+ use_fixture '0266-rootshell-invalid.installfile'
+ run_validate
+ expect(last_command_started).to have_output(/error: .*rootshell.*/)
+ end
+ end
context "for 'pkginstall' key" do
it "warns when a package is listed twice in the same line" do
use_fixture '0216-pkginstall-dup-single.installfile'
@@ -1284,6 +1297,11 @@ RSpec.describe 'HorizonScript validation', :type => :aruba do
run_validate
expect(last_command_started).to have_output(/error: .*duplicate.*timezone/)
end
+ it "fails with a duplicate 'rootshell' key" do
+ use_fixture '0267-rootshell-duplicate.installfile'
+ run_validate
+ expect(last_command_started).to have_output(/error: .*duplicate.*rootshell/)
+ end
end
context "user account keys:" do
context "'username'" do