feat: release v1.1.0 - clean YAML, wildcard DNS protection, and tag/group/source filtering
Build and Publish Release / Build Packages and Publish (push) Successful in 9s
Build and Publish Release / Build Packages and Publish (push) Successful in 9s
This commit is contained in:
1 parent
5fedc44c6b
commit
598e5d7397
18 files changed
+318
-22
No files matched your search
@@ -74,5 +74,44 @@ class TestCliIntegration(unittest.TestCase):
|
||||
content = target_ini.read_text(encoding="utf-8")
|
||||
self.assertIn("ansible_host=", content)
|
||||
|
||||
def test_cli_filtering_by_tag(self):
|
||||
stdout_capture = StringIO()
|
||||
old_stdout = sys.stdout
|
||||
try:
|
||||
sys.stdout = stdout_capture
|
||||
code = main(["--check", "-q", "-t", "hypervisor"])
|
||||
self.assertEqual(code, 0)
|
||||
out = stdout_capture.getvalue()
|
||||
self.assertIn("node0", out)
|
||||
self.assertNotIn("k3s-master-0", out)
|
||||
finally:
|
||||
sys.stdout = old_stdout
|
||||
|
||||
def test_cli_filtering_by_group(self):
|
||||
stdout_capture = StringIO()
|
||||
old_stdout = sys.stdout
|
||||
try:
|
||||
sys.stdout = stdout_capture
|
||||
code = main(["--check", "-q", "-g", "k3s_master"])
|
||||
self.assertEqual(code, 0)
|
||||
out = stdout_capture.getvalue()
|
||||
self.assertIn("k3s-master-0", out)
|
||||
self.assertNotIn("node0", out)
|
||||
finally:
|
||||
sys.stdout = old_stdout
|
||||
|
||||
def test_cli_filtering_by_source(self):
|
||||
stdout_capture = StringIO()
|
||||
old_stdout = sys.stdout
|
||||
try:
|
||||
sys.stdout = stdout_capture
|
||||
code = main(["--check", "-q", "--source-type", "tracer"])
|
||||
self.assertEqual(code, 0)
|
||||
out = stdout_capture.getvalue()
|
||||
self.assertIn("k3s-master-0", out)
|
||||
self.assertIn("node0", out)
|
||||
finally:
|
||||
sys.stdout = old_stdout
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user