diff --git a/tests/integration_test/data/test_configs/standalone_job/hello_numpy_examples.yml b/tests/integration_test/data/test_configs/standalone_job/hello_numpy_examples.yml index e578f70420..f3a87da6d7 100644 --- a/tests/integration_test/data/test_configs/standalone_job/hello_numpy_examples.yml +++ b/tests/integration_test/data/test_configs/standalone_job/hello_numpy_examples.yml @@ -43,3 +43,19 @@ tests: args: { server_model_names: ["server"] } - path: tests.integration_test.src.validators.NumpySAGResultValidator args: { expected_result: [ [ 4, 5, 6 ], [ 7, 8, 9 ], [ 10, 11, 12 ] ] } + - test_name: "run hello-ccwf" + # TODO: add a result validator for the "models" saved on client site (ccwf) + event_sequence: + - "trigger": + "type": "server_log" + "data": "Server started" + "actions": [ "submit_job hello-ccwf/jobs/swarm_cse_numpy" ] + "result": + "type": "job_submit_success" + - "trigger": + "type": "run_state" + "data": { "run_finished": True } + "actions": [ "ensure_current_job_done" ] + "result": + "type": "run_state" + "data": { "run_finished": True } diff --git a/tests/integration_test/src/validators/np_sag_result_validator.py b/tests/integration_test/src/validators/np_sag_result_validator.py index 0e8690abb1..bbf6c94d63 100644 --- a/tests/integration_test/src/validators/np_sag_result_validator.py +++ b/tests/integration_test/src/validators/np_sag_result_validator.py @@ -20,9 +20,10 @@ class NumpySAGResultValidator(FinishJobResultValidator): - def __init__(self, expected_result): + def __init__(self, expected_result, model_name: str = "server.npy"): super().__init__() self.expected_result = np.array(expected_result) + self.model_name = model_name def validate_finished_results(self, job_result, client_props) -> bool: server_run_dir = job_result["workspace_root"] @@ -32,7 +33,7 @@ def validate_finished_results(self, job_result, client_props) -> bool: self.logger.error(f"models dir {models_dir} doesn't exist.") return False - model_path = os.path.join(models_dir, "server.npy") + model_path = os.path.join(models_dir, self.model_name) if not os.path.isfile(model_path): self.logger.error(f"model_path {model_path} doesn't exist.") return False