aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/molecule/default/tests/test_lineinfile_strategy.py
diff options
context:
space:
mode:
Diffstat (limited to 'molecule/default/tests/test_lineinfile_strategy.py')
-rw-r--r--molecule/default/tests/test_lineinfile_strategy.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/molecule/default/tests/test_lineinfile_strategy.py b/molecule/default/tests/test_lineinfile_strategy.py
index 770459e..d7f9738 100644
--- a/molecule/default/tests/test_lineinfile_strategy.py
+++ b/molecule/default/tests/test_lineinfile_strategy.py
@@ -122,11 +122,12 @@ def test_disabled_handlers_do_not_run(host):
assert not host.file("/tmp/disabled-shell-handler").exists
-def test_future_lineinfile_removal_fixture_is_untouched(host):
+def test_lineinfile_absent_removes_exporters(host):
assert read_yaml_file(host, "/opt/lineinfile_state_removal.yml") == [
{
"labels": {"job": "shared"},
- "targets": ["keep:9100", "remove:9100"],
+ "targets": ["keep:9100"],
},
- {"labels": {"job": "remove_last"}, "targets": ["remove:9200"]},
+ {"labels": {"job": "remove_last"}, "targets": None},
]
+ assert not host.file("/opt/lineinfile_state_missing.yml").exists