diff options
| author | Colin Wilk <colin.wilk@tum.de> | 2023-05-27 20:00:19 +0200 |
|---|---|---|
| committer | Colin Wilk <colin.wilk@tum.de> | 2023-05-27 20:00:19 +0200 |
| commit | 4dbd1e660fe815a2cc6032c54a2c1d1dbf62cd7b (patch) | |
| tree | 785801b9a47719c58069147960433d1854df4c65 /molecule/default/tests | |
| parent | 0b2823d40892ffca4c0c64536c6a821cebaf3ff6 (diff) | |
| download | ansible-role-prometheus-target-4dbd1e660fe815a2cc6032c54a2c1d1dbf62cd7b.tar.gz ansible-role-prometheus-target-4dbd1e660fe815a2cc6032c54a2c1d1dbf62cd7b.zip | |
Add molecule with some simple test cases
Signed-off-by: Colin Wilk <colin.wilk@tum.de>
Diffstat (limited to 'molecule/default/tests')
| -rw-r--r-- | molecule/default/tests/test_check_prometheus_targets.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/molecule/default/tests/test_check_prometheus_targets.py b/molecule/default/tests/test_check_prometheus_targets.py new file mode 100644 index 0000000..8a0f413 --- /dev/null +++ b/molecule/default/tests/test_check_prometheus_targets.py @@ -0,0 +1,16 @@ +testinfra_hosts = ['prometheus'] + + +def test_check_hosts_added(host): + t1 = host.file('/opt/target1.yml') + t2 = host.file('/opt/target2.yml') + t3 = host.file('/opt/target3.yml') + + assert t1.exists + assert t2.exists + assert t3.exists + + assert ' - application' in t1.content_string + assert ' - test1' in t2.content_string + assert ' - test2' in t2.content_string + assert ' - application_AA' in t3.content_string |