diff options
Diffstat (limited to 'molecule/default')
| -rw-r--r-- | molecule/default/converge.yml | 2 | ||||
| -rw-r--r-- | molecule/default/tests/test_check_prometheus_targets.py | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml index e96fb81..9346988 100644 --- a/molecule/default/converge.yml +++ b/molecule/default/converge.yml @@ -17,6 +17,7 @@ - /opt/simple_target1.yml - /opt/simple_target2.yml - /opt/simple_target3.yml + - /opt/simple_target4.yml vars: prometheus_target_host: prometheus @@ -34,6 +35,7 @@ - id: node_exporter - { id: blackbox_exporter, host: test1 } - { id: blackbox_exporter, host: test2 } + - { host: exporter_without_id, path: /opt/simple_target4.yml } - role: kliwniloc.prometheus_target prometheus_target_exporter: - id: blackbox_exporter diff --git a/molecule/default/tests/test_check_prometheus_targets.py b/molecule/default/tests/test_check_prometheus_targets.py index 9ce1056..ddf3a22 100644 --- a/molecule/default/tests/test_check_prometheus_targets.py +++ b/molecule/default/tests/test_check_prometheus_targets.py @@ -7,10 +7,12 @@ def test_check_hosts_added_simple(host): t1 = host.file('/opt/simple_target1.yml') t2 = host.file('/opt/simple_target2.yml') t3 = host.file('/opt/simple_target3.yml') + t4 = host.file('/opt/simple_target4.yml') assert t1.exists assert t2.exists assert t3.exists + assert t4.exists assert t1.content_string == \ ' - application\n' @@ -23,6 +25,9 @@ def test_check_hosts_added_simple(host): assert t3.content_string == \ ' - application_AA\n' + assert t4.content_string == \ + ' - exporter_without_id\n' + """ Test prefix functionality """ |