summaryrefslogtreecommitdiff
path: root/tests/spec
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-26 01:09:57 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-26 01:09:57 -0500
commitcd2ab0ea31fd4dc9305c1d5e08100eafaff19f7e (patch)
tree56f0f158ae77150952014557b716986199ad4938 /tests/spec
parenta5da0c07e7202f44b03acfc1324fb410bff94496 (diff)
downloadhorizon-cd2ab0ea31fd4dc9305c1d5e08100eafaff19f7e.tar.gz
horizon-cd2ab0ea31fd4dc9305c1d5e08100eafaff19f7e.tar.bz2
horizon-cd2ab0ea31fd4dc9305c1d5e08100eafaff19f7e.tar.xz
horizon-cd2ab0ea31fd4dc9305c1d5e08100eafaff19f7e.zip
hscript: Implement lvm_pv, add tests
Diffstat (limited to 'tests/spec')
-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 df504ca..976f0f6 100644
--- a/tests/spec/validator_spec.rb
+++ b/tests/spec/validator_spec.rb
@@ -788,6 +788,24 @@ RSpec.describe 'HorizonScript validation', :type => :aruba do
expect(last_command_started).to have_output(/error: .*partition.*size/)
end
end
+ context "for 'lvm_pv' key" do
+ it "succeeds with normal value" do
+ use_fixture '0163-lvmpv-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 a non-absolute block device path" do
+ use_fixture '0164-lvmpv-invalid.installfile'
+ run_validate
+ expect(last_command_started).to have_output(/error: .*lvm_pv.*path/)
+ end
+ it "fails with duplicate physical volumes" do
+ use_fixture '0165-lvmpv-duplicate.installfile'
+ run_validate
+ expect(last_command_started).to have_output(/error: .*lvm_pv.*exists/)
+ end
+ end
end
context "unique keys" do
# Runner.Validate.network.