Skip to content

Commit

Permalink
Add test for Array[Hash] interfacedetails
Browse files Browse the repository at this point in the history
  • Loading branch information
oraziobattaglia committed Sep 27, 2021
1 parent 8870b80 commit 03f82da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/acceptance/zabbix_host_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class { 'zabbix':
use_ip => false,
port => 161,
groups => ['Virtual machines'],
templates => #{template_snmp},
templates => #{template},
macros => [],
}
EOS
Expand Down Expand Up @@ -253,7 +253,7 @@ class { 'zabbix':
expect(test4['interfaces'][0]['port']).to eq('161')
end
it 'has a correct interface type configured' do
expect(test4['interfaces'][0]['type']).to eq('2')
expect(test4['interfaces'][0]['type']).to eq('1')
end
it 'has a correct interface details configured' do
expect(test4['interfaces'][0]['details']).to eq([])
Expand All @@ -262,7 +262,7 @@ class { 'zabbix':
expect(test4['interfaces'][0]['useip']).to eq('0')
end
it 'has templates attached' do
expect(test4['parentTemplates'].map { |t| t['host'] }.sort).to eq(template_snmp.sort)
expect(test4['parentTemplates'].map { |t| t['host'] }.sort).to eq(template.sort)
end
end

Expand Down

0 comments on commit 03f82da

Please sign in to comment.