Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Commit

Permalink
fixup! Add test for existence of shell jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
jepebe committed Sep 17, 2020
1 parent dd76e1b commit 11ba377
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions python/tests/share/test_shell_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
class TestSiteConfigShellJobs(ResTest):
def test_shell_script_jobs_availability(self):
config_file = self.createTestPath("local/simple_config/minimum_config")
share_path = self.createSharePath("ert/shell_scripts")

res_config = ResConfig(config_file)
site_config = res_config.site_config
Expand All @@ -15,21 +14,20 @@ def test_shell_script_jobs_availability(self):
fm_shell_jobs = {}
for job in installed_jobs:
exe = job.get_executable()
if exe.startswith(share_path):
if "shell_scripts" in exe:
fm_shell_jobs[job.name().lower()] = exe

list_from_content = res_config.ert_workflow_list
wf_shell_jobs = {}
for wf_name in list_from_content.getJobNames():
exe = list_from_content.getJob(wf_name).executable()
if exe and exe.startswith(share_path):
if exe and "shell_scripts" in exe:
wf_shell_jobs[wf_name] = exe

assert fm_shell_jobs == wf_shell_jobs

def test_shell_script_jobs_names(self):
config_file = self.createTestPath("local/simple_config/minimum_config")
share_path = self.createSharePath("ert/shell_scripts")

shell_job_names = [
"delete_file",
Expand All @@ -48,7 +46,7 @@ def test_shell_script_jobs_names(self):
list_from_content = res_config.ert_workflow_list
for wf_name in list_from_content.getJobNames():
exe = list_from_content.getJob(wf_name).executable()
if exe and exe.startswith(share_path):
if exe and "shell_scripts" in exe:
assert wf_name in shell_job_names
found_jobs.add(wf_name)

Expand Down

0 comments on commit 11ba377

Please sign in to comment.