diff options
| author | Colin Wilk <colin@wilk.cx> | 2026-08-11 00:54:41 +0200 |
|---|---|---|
| committer | Colin Wilk <colin@wilk.cx> | 2026-08-11 00:54:41 +0200 |
| commit | c267536ecfbcf37e68226ade2ed29c3b1f356a98 (patch) | |
| tree | 0fb9728b0095dd34b873fa6c137b75c60734940d /molecule/default/tests/test_yaml_strategy.py | |
| parent | c33948c219032977779a7ef6d82c16e84f37b81a (diff) | |
| download | ansible-role-prometheus-target-c267536ecfbcf37e68226ade2ed29c3b1f356a98.tar.gz ansible-role-prometheus-target-c267536ecfbcf37e68226ade2ed29c3b1f356a98.zip | |
Add `state` option for removing exporters
Diffstat (limited to 'molecule/default/tests/test_yaml_strategy.py')
| -rw-r--r-- | molecule/default/tests/test_yaml_strategy.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/molecule/default/tests/test_yaml_strategy.py b/molecule/default/tests/test_yaml_strategy.py index c3d0dd9..7f9b6ed 100644 --- a/molecule/default/tests/test_yaml_strategy.py +++ b/molecule/default/tests/test_yaml_strategy.py @@ -197,11 +197,11 @@ def test_yaml_skip_default_exporters(host): assert target.content_string == "" -def test_future_yaml_removal_fixture_is_untouched(host): +def test_yaml_absent_removes_exporters_and_empty_groups(host): assert read_yaml_file(host, "/opt/yaml_state_removal.yml") == [ { "labels": {"job": "shared"}, - "targets": ["keep:9100", "remove:9100"], + "targets": ["keep:9100"], }, - {"labels": {"job": "remove_last"}, "targets": ["remove:9200"]}, ] + assert not host.file("/opt/yaml_state_missing.yml").exists |