diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-12 02:04:08 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-12 02:04:08 -0500 |
commit | c9ac06657ecf79c5c7bada112a6fc67f87fbcba1 (patch) | |
tree | bc25d100c40829d3d4a9a514a7d78985ca798adb /tests | |
parent | c3bd806edc816ce176e507394250163aab9c7365 (diff) | |
download | horizon-c9ac06657ecf79c5c7bada112a6fc67f87fbcba1.tar.gz horizon-c9ac06657ecf79c5c7bada112a6fc67f87fbcba1.tar.bz2 horizon-c9ac06657ecf79c5c7bada112a6fc67f87fbcba1.tar.xz horizon-c9ac06657ecf79c5c7bada112a6fc67f87fbcba1.zip |
hscript: Validate 'hostname' keys and add another test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fixtures/0032-hostname-ends-with-dot.installfile | 5 | ||||
-rw-r--r-- | tests/spec/validator.rb | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/fixtures/0032-hostname-ends-with-dot.installfile b/tests/fixtures/0032-hostname-ends-with-dot.installfile new file mode 100644 index 0000000..f608dde --- /dev/null +++ b/tests/fixtures/0032-hostname-ends-with-dot.installfile @@ -0,0 +1,5 @@ +network true +hostname test.machine. +pkginstall adelie-base +rootpw $6$gumtLGmHwOVIRpQR$2M9PUO24hy5mofzWWf9a.YLbzOgOlUby1g0hDj.wG67E2wrrvys59fq02PPdxBdbgkLZFtjfEx6MHZwMBamwu/ +mount /dev/sda1 / diff --git a/tests/spec/validator.rb b/tests/spec/validator.rb index 8f6ae6c..e4ba703 100644 --- a/tests/spec/validator.rb +++ b/tests/spec/validator.rb @@ -138,6 +138,12 @@ RSpec.describe 'HorizonScript Validation Utility', :type => :aruba do run_validate expect(last_command_started).to have_output(/error: .*hostname.*/) end + # Runner.Validate.hostname. + it "with dot at end of domain" do + use_fixture '0032-hostname-ends-with-dot.installfile' + run_validate + expect(last_command_started).to_not have_output(/error: .*hostname.*/) + end end # Runner.Validate.rootpw. # Runner.Validate.rootpw.Crypt. |