@@ -0,0 +1,9 @@
+from baker import base_cli, run_batch
+
+def test_all_conf(cfg):
+ cli = base_cli(['--dry-run'])
+ cli.cfg = cfg
+ import pdb;pdb.set_trace()
+ for task in cfg.tasks.values():
+ run_batch(task, [], cli)
@@ -0,0 +1,12 @@
+import glob
+from baker import load
+def pytest_generate_tests(metafunc):
+ if 'cfg' in metafunc.fixturenames:
+ configs = []
+ for name in glob.glob('tests/*yaml'):
+ cfg = load(name)
+ configs.append(cfg)
+ metafunc.parametrize("cfg", configs)
@@ -0,0 +1,5 @@
+networks:
+ web:
+ hosts:
+ - web1.example.com
+ - web2.example.com
@@ -0,0 +1,3 @@
+[pytest]
+addopts = -s --tb=native --maxfail=1
+python_files = *_test.py
+tasks:
+ time:
+ desc: Print current time (on local machine)
+ local: date -Iseconds
+ once: true