From: Tom Hughes Date: Wed, 16 Sep 2020 19:57:32 +0000 (+0000) Subject: Fix prometheus test X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/0de4412db460371df118218c05aa2dcaf0a6b7e3?ds=sidebyside;hp=9855bf930976f2de372a7a8712b275ba52495153 Fix prometheus test --- diff --git a/.kitchen.yml b/.kitchen.yml index 7c446effc..854666cc6 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -278,6 +278,15 @@ suites: - name: prometheus run_list: - recipe[prometheus::default] + attributes: + networking: + interfaces: + test: + interface: eth0 + role: internal + address: 172.18.0.2 + prefix: 16 + gateway: 172.18.0.1 - name: prometheus-server run_list: - recipe[prometheus::server] diff --git a/cookbooks/networking/attributes/default.rb b/cookbooks/networking/attributes/default.rb index 3872a5165..23cd15eb0 100644 --- a/cookbooks/networking/attributes/default.rb +++ b/cookbooks/networking/attributes/default.rb @@ -7,6 +7,7 @@ default[:networking][:firewall][:log] = true default[:networking][:firewall][:mark] = true default[:networking][:firewall][:raw] = true default[:networking][:firewall][:mangle] = true +default[:networking][:roles] = {} default[:networking][:interfaces] = {} default[:networking][:nameservers] = [] default[:networking][:search] = [] diff --git a/test/integration/prometheus/serverspec/prometheus_node_exporter_spec.rb b/test/integration/prometheus/serverspec/prometheus_node_exporter_spec.rb index c37883d15..bb178dd96 100644 --- a/test/integration/prometheus/serverspec/prometheus_node_exporter_spec.rb +++ b/test/integration/prometheus/serverspec/prometheus_node_exporter_spec.rb @@ -13,5 +13,5 @@ describe service("prometheus-node-exporter") do end describe port(9100) do - it { should be_listening.with("tcp6") } + it { should be_listening.with("tcp") } end