diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-24 01:29:29 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-24 01:29:29 -0500 |
commit | 725e3f9f0c401aa34bb0d3d01bb8119797d038f7 (patch) | |
tree | b0c50230f073208d9c31e9e181c50deee74a4d72 /tests | |
parent | 240ff8c1d9e5b03d27804490767c15b7877305a2 (diff) | |
download | horizon-725e3f9f0c401aa34bb0d3d01bb8119797d038f7.tar.gz horizon-725e3f9f0c401aa34bb0d3d01bb8119797d038f7.tar.bz2 horizon-725e3f9f0c401aa34bb0d3d01bb8119797d038f7.tar.xz horizon-725e3f9f0c401aa34bb0d3d01bb8119797d038f7.zip |
hscript: Ensure netaddress iface name is < IFNAMSIZ
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fixtures/0130-netaddress-invalid-iface.installfile | 6 | ||||
-rw-r--r-- | tests/spec/validator_spec.rb | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/fixtures/0130-netaddress-invalid-iface.installfile b/tests/fixtures/0130-netaddress-invalid-iface.installfile new file mode 100644 index 0000000..e641c26 --- /dev/null +++ b/tests/fixtures/0130-netaddress-invalid-iface.installfile @@ -0,0 +1,6 @@ +network false +hostname test.machine +pkginstall adelie-base +rootpw $6$gumtLGmHwOVIRpQR$2M9PUO24hy5mofzWWf9a.YLbzOgOlUby1g0hDj.wG67E2wrrvys59fq02PPdxBdbgkLZFtjfEx6MHZwMBamwu/ +mount /dev/sda1 / +netaddress enP20p36s15f10d16 dhcp diff --git a/tests/spec/validator_spec.rb b/tests/spec/validator_spec.rb index 624eaa2..b07e383 100644 --- a/tests/spec/validator_spec.rb +++ b/tests/spec/validator_spec.rb @@ -293,6 +293,11 @@ RSpec.describe 'HorizonScript validation', :type => :aruba do run_validate expect(last_command_started).to have_output(/error: .*netaddress.*require/) end + it "fails with invalid interface name" do + use_fixture '0130-netaddress-invalid-iface.installfile' + run_validate + expect(last_command_started).to have_output(/error: .*netaddress.*interface/) + end # Runner.Validate.netaddress.Validity.Type. it "fails on invalid address type" do use_fixture '0037-netaddress-invalid-type.installfile' |