File tree Expand file tree Collapse file tree
examples/runbooks/runbooks Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 with :
2626 archive : /tmp/app.tar.gz
2727 dest : /tmp/automax-demo
28- source : /tmp/automax-demo.gz
2928 - id : archive_tar
3029 use : archive.tar
3130 with :
Original file line number Diff line number Diff line change @@ -644,6 +644,25 @@ def test_plugin_smoke_runbooks_keep_file_modes_as_strings():
644644
645645 assert offenders == []
646646
647+
648+ def test_plugin_smoke_runbooks_match_archive_decompress_parameters ():
649+ runbook_path = Path ("examples/runbooks/runbooks/03-archive.check.yaml" )
650+ data = yaml .safe_load (runbook_path .read_text (encoding = "utf-8" ))
651+ offenders = []
652+ for task in data .get ("tasks" , []):
653+ for step in task .get ("steps" , []):
654+ for substep in step .get ("substeps" , []):
655+ if substep .get ("use" ) != "archive.decompress" :
656+ continue
657+ params = substep .get ("with" ) or {}
658+ if "source" in params :
659+ offenders .append (
660+ f"{ runbook_path } :{ substep .get ('id' )} : "
661+ "source is not valid for archive.decompress"
662+ )
663+
664+ assert offenders == []
665+
647666def test_docs_show_sudo_password_env_for_runs_and_capability_installs ():
648667 docs = "\n " .join (
649668 path .read_text (encoding = "utf-8" )
You can’t perform that action at this time.
0 commit comments