From 452868b55b32e8dc095a2e1c0a33a6f1d2fae666 Mon Sep 17 00:00:00 2001 From: fritz-astronomer <80706212+fritz-astronomer@users.noreply.github.com> Date: Thu, 9 Jan 2025 14:34:00 -0500 Subject: [PATCH] fix: add demo integration test --- orbiter_translations/__init__.py | 2 +- tests/autosys/demo/workflow/demo.jil | 6 ++++++ tests/autosys/jil_demo_test.py | 12 ++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 tests/autosys/demo/workflow/demo.jil create mode 100644 tests/autosys/jil_demo_test.py diff --git a/orbiter_translations/__init__.py b/orbiter_translations/__init__.py index 64998d8..f833df0 100644 --- a/orbiter_translations/__init__.py +++ b/orbiter_translations/__init__.py @@ -1,3 +1,3 @@ -__version__ = "0.5.0" +__version__ = "0.5.1" version = __version__ diff --git a/tests/autosys/demo/workflow/demo.jil b/tests/autosys/demo/workflow/demo.jil new file mode 100644 index 0000000..ae2b5d8 --- /dev/null +++ b/tests/autosys/demo/workflow/demo.jil @@ -0,0 +1,6 @@ +insert_job: foo.job +job_type: CMD +command: "C:\\ldhe\\cxl\\TidalDB\\startApp.cmd" "arg1" "arg2" "arg3" +machine: bar +owner: foo@bar.com +description: "Foo Job" diff --git a/tests/autosys/jil_demo_test.py b/tests/autosys/jil_demo_test.py new file mode 100644 index 0000000..ed5ad79 --- /dev/null +++ b/tests/autosys/jil_demo_test.py @@ -0,0 +1,12 @@ +from orbiter.objects.operators.ssh import OrbiterSSHOperator + +from orbiter_translations.autosys.jil_demo import translation_ruleset + + +def test_autosys_demo(project_root): + actual = translation_ruleset.translate_fn( + translation_ruleset, (project_root / "tests/autosys/demo/workflow/") + ) + assert list(actual.dags.keys()) == ["foo_job"] + assert sorted(list(actual.dags["foo_job"].tasks.keys())) == sorted(["foo_job",]) + assert isinstance(actual.dags["foo_job"].tasks["foo_job"], OrbiterSSHOperator)