summaryrefslogtreecommitdiff
path: root/tests/spec/validator_spec.rb
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-10-15 13:25:38 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-10-15 13:25:38 -0500
commite9870d0b830deb0b253e5e514fc90ceee201a778 (patch)
tree244344085bdcd5ada2f187fc4579005caa51e409 /tests/spec/validator_spec.rb
parentf9850e766787d46bcae874fd4302cab0f0244e03 (diff)
downloadhorizon-e9870d0b830deb0b253e5e514fc90ceee201a778.tar.gz
horizon-e9870d0b830deb0b253e5e514fc90ceee201a778.tar.bz2
horizon-e9870d0b830deb0b253e5e514fc90ceee201a778.tar.xz
horizon-e9870d0b830deb0b253e5e514fc90ceee201a778.zip
Add many more various test cases
Diffstat (limited to 'tests/spec/validator_spec.rb')
-rw-r--r--tests/spec/validator_spec.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/spec/validator_spec.rb b/tests/spec/validator_spec.rb
index ceed3c2..2040fe0 100644
--- a/tests/spec/validator_spec.rb
+++ b/tests/spec/validator_spec.rb
@@ -937,6 +937,18 @@ RSpec.describe 'HorizonScript validation', :type => :aruba do
expect(last_command_started).to have_output(PARSER_SUCCESS)
expect(last_command_started).to have_output(VALIDATOR_SUCCESS)
end
+ it "handles 'bios'" do
+ use_fixture '0253-fs-hfsplus.installfile'
+ run_validate
+ expect(last_command_started).to have_output(PARSER_SUCCESS)
+ expect(last_command_started).to have_output(VALIDATOR_SUCCESS)
+ end
+ it "handles 'prep'" do
+ use_fixture '0254-partition-type-prep.installfile'
+ run_validate
+ expect(last_command_started).to have_output(PARSER_SUCCESS)
+ expect(last_command_started).to have_output(VALIDATOR_SUCCESS)
+ end
it "handles no value" do
use_fixture '0154-partition-type-none.installfile'
run_validate
@@ -1146,6 +1158,12 @@ RSpec.describe 'HorizonScript validation', :type => :aruba do
run_validate
expect(last_command_started).to have_output(/error: .*fs.*already/)
end
+ it "succeeds with HFS+" do
+ use_fixture '0253-fs-hfsplus.installfile'
+ run_validate
+ expect(last_command_started).to have_output(PARSER_SUCCESS)
+ expect(last_command_started).to have_output(VALIDATOR_SUCCESS)
+ end
end
context "for 'bootloader' key" do
it "succeeds with valid values" do
@@ -1165,12 +1183,20 @@ RSpec.describe 'HorizonScript validation', :type => :aruba do
use_fixture '0249-bootloader-ppc.installfile'
run_validate
expect(last_command_started).to have_output(/error: .*bootloader.*/)
+ use_fixture '0258-bootloader-spaces.installfile'
+ run_validate
+ expect(last_command_started).to have_output(/error: .*bootloader.*/)
end
it "fails with unprepared architectures" do
use_fixture '0252-bootloader-alpha.installfile'
run_validate
expect(last_command_started).to have_output(/error: .*bootloader.*/)
end
+ it "fails when loader not specified and architecture doesn't have default" do
+ use_fixture '0257-bootloader-armv7.installfile'
+ run_validate
+ expect(last_command_started).to have_output(/error: .*bootloader: no default.*/)
+ end
end
context "for 'keymap' key" do
it "succeeds with a simple value" do