diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-31 19:37:01 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-31 19:37:01 -0500 |
commit | 77ef54d7a1eccacefc615fee178374760a2401a5 (patch) | |
tree | 27f1891bfe5e0a47efab39728a43dbd20bf1cb04 /tests/spec | |
parent | e80e8ad8578a3426b810363094243c5d822742d5 (diff) | |
download | horizon-77ef54d7a1eccacefc615fee178374760a2401a5.tar.gz horizon-77ef54d7a1eccacefc615fee178374760a2401a5.tar.bz2 horizon-77ef54d7a1eccacefc615fee178374760a2401a5.tar.xz horizon-77ef54d7a1eccacefc615fee178374760a2401a5.zip |
hscript: Implement Nameserver, add tests
Diffstat (limited to 'tests/spec')
-rw-r--r-- | tests/spec/validator_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/spec/validator_spec.rb b/tests/spec/validator_spec.rb index c36e5a1..96a2caf 100644 --- a/tests/spec/validator_spec.rb +++ b/tests/spec/validator_spec.rb @@ -198,6 +198,24 @@ RSpec.describe 'HorizonScript validation', :type => :aruba do expect(last_command_started).to have_output(/error: .*language.*codeset/) end end + context "for 'nameserver' key" do + it "succeeds with IPv4 and IPv6 addresses" do + use_fixture '0183-nameserver-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 value" do + use_fixture '0184-nameserver-invalid.installfile' + run_validate + expect(last_command_started).to have_output(/error: .*nameserver.*expected/) + end + it "fails with brackets around IPv6 addresses" do + use_fixture '0185-nameserver-brackets.installfile' + run_validate + expect(last_command_started).to have_output(/nameserver.*brackets/) + end + end context "for 'firmware' key" do it "always supports 'false' value" do use_fixture '0112-firmware-false.installfile' |