Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix $hostinterfaceitem to not be an Fqdn. #726

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions manifests/agent.pp
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,11 @@
Stdlib::Ensure::Service $service_ensure = $zabbix::params::agent_service_ensure,
Boolean $service_enable = $zabbix::params::agent_service_enable,
$hostname = $zabbix::params::agent_hostname,
$hostnameitem = $zabbix::params::agent_hostnameitem,
Optional[String[1]] $hostnameitem = $zabbix::params::agent_hostnameitem,
$hostmetadata = $zabbix::params::agent_hostmetadata,
$hostmetadataitem = $zabbix::params::agent_hostmetadataitem,
Optional[Stdlib::Fqdn] $hostinterface = $zabbix::params::agent_hostinterface,
Optional[Stdlib::Fqdn] $hostinterfaceitem = $zabbix::params::agent_hostinterfaceitem,
$hostinterfaceitem = $zabbix::params::agent_hostinterfaceitem,
bjschafer marked this conversation as resolved.
Show resolved Hide resolved
$refreshactivechecks = $zabbix::params::agent_refreshactivechecks,
$buffersend = $zabbix::params::agent_buffersend,
$buffersize = $zabbix::params::agent_buffersize,
Expand Down
10 changes: 10 additions & 0 deletions spec/classes/agent_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,16 @@
it { is_expected.to contain_file(config_path).with_content %r{^HostInterfaceItem=system.hostname$} }
end

context 'configuration file with hostinterfaceitem set to fqdn' do
let :params do
{
hostinterfaceitem: 'zabbix.example.com'
}
end

it { is_expected.to compile.and_raise_error(%r{.*}) }
end

context 'configuration file with hostinterface' do
let :params do
{
Expand Down