diff --git a/src/common/staging_enums.py b/src/common/staging_enums.py index 006f536..61d07da 100644 --- a/src/common/staging_enums.py +++ b/src/common/staging_enums.py @@ -33,7 +33,7 @@ class StagingTestExecutor(str, Enum): """ # consumer tests - consumer = 'consumer' + CONSUMER = 'consumer' # provider tests - provider = 'provider' + PROVIDER = 'provider' diff --git a/src/staging/staging.py b/src/staging/staging.py index 198a7ad..721a481 100644 --- a/src/staging/staging.py +++ b/src/staging/staging.py @@ -143,7 +143,7 @@ def create_test_files(self, run_dir: str, run_data: json) -> int: # write out the data with open(out_file_name, 'w', encoding='utf-8') as fp: - self.logger.debug(f'Writing to {out_file_name}') + self.logger.debug('Writing to %s', out_file_name) # write out the preamble fp.write('#/bin/bash\ncd /var/lib/irods;\n') diff --git a/src/tests/test_staging.py b/src/tests/test_staging.py index 7e3d315..fc81a7a 100644 --- a/src/tests/test_staging.py +++ b/src/tests/test_staging.py @@ -85,8 +85,8 @@ def test_file_creation(): # create a test list run_data: dict = {'request_data': {"workflow-type": "CORE", "os-image": "ubuntu-20.04:latest", "test-image": "busybox:1.35", - "tests": [{'consumer': ["test_ihelp", "test_ilocate", "test_ils"]}, - {'provider': ["test_ihelp", "test_ilocate", "test_ils"]}]}} + "tests": [{'CONSUMER': ["test_ihelp", "test_ilocate", "test_ils"]}, + {'PROVIDER': ["test_ihelp", "test_ilocate", "test_ils"]}]}} # make the call ret_val = staging.create_test_files(os.path.dirname(__file__), run_data) @@ -100,7 +100,7 @@ def test_file_creation(): os.unlink(os.path.join(os.path.dirname(__file__), 'provider_test_list.json')) run_data: dict = {'request_data': {'workflow-type': 'CORE', 'os-image': 'ubuntu-20.04:latest', 'test-image': 'busybox:1.35', - 'tests': [{'consumer': ["test_ihelp", "test_ilocate", "test_ils"]}]}} + 'tests': [{'CONSUMER': ["test_ihelp", "test_ilocate", "test_ils"]}]}} # make the call ret_val = staging.create_test_files(os.path.dirname(__file__), run_data)