Fix remaining API tests

This commit is contained in:
mvdbeek
2024-01-08 11:33:40 +01:00
parent 10f570c748
commit c9df2ebd38
2 changed files with 14 additions and 5 deletions
+11 -3
View File
@@ -1874,9 +1874,17 @@ class JobSummary(JobBaseModel):
external_id: Optional[str] = Field(
None,
title="External ID",
description=(
"The job id used by the external job runner (Condor, Pulsar, etc.)" "Only administrator can see this value."
),
description="The job id used by the external job runner (Condor, Pulsar, etc.). Only administrator can see this value.",
)
handler: Optional[str] = Field(
None,
title="Job Handler",
description="The job handler process assigned to handle this job. Only administrator can see this value.",
)
job_runner_name: Optional[str] = Field(
None,
title="Job Runner Name",
description="Name of the job runner plugin that handles this job. Only administrator can see this value.",
)
command_line: Optional[str] = Field(
None,
+3 -2
View File
@@ -44,11 +44,12 @@ class TestJobsApi(ApiTestCase, TestsTools):
self.__history_with_new_dataset(history_id)
jobs = self.__jobs_index(admin=False)
job = jobs[0]
self._assert_not_has_keys(job, "external_id")
assert job["external_id"] is None
jobs = self.__jobs_index(admin=True)
job = jobs[0]
self._assert_has_keys(job, "command_line", "external_id")
assert job["command_line"]
assert job["external_id"]
@pytest.mark.require_new_history
def test_admin_job_list(self, history_id):