diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-11-06 16:47:19 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-11-06 16:52:36 -0600 |
commit | e4d2dfda526402b1cd4623ea473ab655ea421de5 (patch) | |
tree | bf4e293dda2025366061f662a7890c3fbfa2df54 /tests/spec/validator_spec.rb | |
parent | d3f9715777ee32b7c3d38f8b520597eea2d79a79 (diff) | |
download | horizon-e4d2dfda526402b1cd4623ea473ab655ea421de5.tar.gz horizon-e4d2dfda526402b1cd4623ea473ab655ea421de5.tar.bz2 horizon-e4d2dfda526402b1cd4623ea473ab655ea421de5.tar.xz horizon-e4d2dfda526402b1cd4623ea473ab655ea421de5.zip |
tests: Add more nameserver behavioural tests
Diffstat (limited to 'tests/spec/validator_spec.rb')
-rw-r--r-- | tests/spec/validator_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/spec/validator_spec.rb b/tests/spec/validator_spec.rb index e950a97..a0b67df 100644 --- a/tests/spec/validator_spec.rb +++ b/tests/spec/validator_spec.rb @@ -220,6 +220,21 @@ RSpec.describe 'HorizonScript validation', :type => :aruba do run_validate expect(last_command_started).to have_output(/nameserver.*brackets/) end + it "warns with more than MAXNS nameservers" do + use_fixture '0201-nameserver-max.installfile' + run_validate + expect(last_command_started).to have_output(/warning: .*nameserver.*more/) + end + it "fails with an invalid IPv4 address" do + use_fixture '0202-nameserver-bad4.installfile' + run_validate + expect(last_command_started).to have_output(/error: .*nameserver.*valid IPv4/) + end + it "fails with an invalid IPv6 address" do + use_fixture '0203-nameserver-bad6.installfile' + run_validate + expect(last_command_started).to have_output(/error: .*nameserver.*valid IPv6/) + end end context "for 'firmware' key" do it "always supports 'false' value" do |