]> git.openstreetmap.org Git - chef.git/commitdiff
Fix prometheus test
authorTom Hughes <tom@compton.nu>
Wed, 16 Sep 2020 19:57:32 +0000 (19:57 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 16 Sep 2020 19:57:32 +0000 (19:57 +0000)
.kitchen.yml
cookbooks/networking/attributes/default.rb
test/integration/prometheus/serverspec/prometheus_node_exporter_spec.rb

index 7c446effcc7dd0376579f18028160f24a2083474..854666cc6f144da828f0d82d36baea55a82d5ead 100644 (file)
@@ -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]
index 3872a516516f0a481a10f96ea6419bddf87525ba..23cd15eb0652a2470f35168cb174bff402640ae4 100644 (file)
@@ -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] = []
index c37883d15ab0395ac8ed3f6df95f959fc897ff2d..bb178dd96a53bd19cb66380e6babe14f772cef21 100644 (file)
@@ -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