summaryrefslogtreecommitdiff
path: root/tests/spec/validator_spec.rb
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-29 10:51:41 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-29 10:51:41 -0500
commit7fbaf52dbd9a9afb406d4a631ff5a1625c90ef64 (patch)
tree007870da7872a8828d4bc4babfc49f9e01557992 /tests/spec/validator_spec.rb
parent84b7e98b805b86e4d63e2ce38a490e86541ed0da (diff)
downloadhorizon-7fbaf52dbd9a9afb406d4a631ff5a1625c90ef64.tar.gz
horizon-7fbaf52dbd9a9afb406d4a631ff5a1625c90ef64.tar.bz2
horizon-7fbaf52dbd9a9afb406d4a631ff5a1625c90ef64.tar.xz
horizon-7fbaf52dbd9a9afb406d4a631ff5a1625c90ef64.zip
hscript: Implement lvm_vg, add tests
Diffstat (limited to 'tests/spec/validator_spec.rb')
-rw-r--r--tests/spec/validator_spec.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/spec/validator_spec.rb b/tests/spec/validator_spec.rb
index 976f0f6..0443140 100644
--- a/tests/spec/validator_spec.rb
+++ b/tests/spec/validator_spec.rb
@@ -806,6 +806,34 @@ RSpec.describe 'HorizonScript validation', :type => :aruba do
expect(last_command_started).to have_output(/error: .*lvm_pv.*exists/)
end
end
+ context "for 'lvm_vg' key" do
+ it "succeeds with a normal value" do
+ use_fixture '0166-lvmvg-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 PV path" do
+ use_fixture '0167-lvmvg-invalid.installfile'
+ run_validate
+ expect(last_command_started).to have_output(/error: .*lvm_vg.*path/)
+ end
+ it "fails with a duplicate volume group name" do
+ use_fixture '0168-lvmvg-duplicate.installfile'
+ run_validate
+ expect(last_command_started).to have_output(/error: .*lvm_vg.*exists/)
+ end
+ it "fails with a dash as the first character of the VG name" do
+ use_fixture '0169-lvmvg-dash.installfile'
+ run_validate
+ expect(last_command_started).to have_output(/error: .*lvm_vg.*name/)
+ end
+ it "requires a volume group name" do
+ use_fixture '0170-lvmvg-without-vg.installfile'
+ run_validate
+ expect(last_command_started).to have_output(/error: .*lvm_vg.*expected/)
+ end
+ end
end
context "unique keys" do
# Runner.Validate.network.