|
10 | 10 | runner = CliRunner()
|
11 | 11 |
|
12 | 12 |
|
13 |
| -result = runner.invoke( |
14 |
| - make, |
15 |
| - [ |
16 |
| - "xnat", |
17 |
| - ( |
18 |
| - f"{PKG_PATH}/specs/" |
19 |
| - "australian-imaging-service/quality-control/phi-finder.yaml" |
20 |
| - ), |
21 |
| - "--spec-root", |
22 |
| - f"{PKG_PATH}/specs", |
23 |
| - "--registry", |
24 |
| - "ghcr.io", |
25 |
| - "--for-localhost", |
26 |
| - "--use-local-packages", |
27 |
| - "--raise-errors", |
28 |
| - ], |
29 |
| -) |
30 |
| - |
31 |
| -assert not result.exit_code, show_cli_trace(result) |
32 |
| - |
33 |
| - |
34 |
| -xlogin = xnat4tests.connect() |
35 |
| - |
36 |
| -cmd_id = install_cs_command( |
37 |
| - "ghcr.io/australian-imaging-service/quality-control.phi-finder:2025.7.2", |
38 |
| - xlogin, |
39 |
| - enable=True, |
40 |
| - projects_to_enable=["dummydicomproject"], |
41 |
| - replace_existing=True, |
42 |
| - command_name="phi-finder", |
43 |
| -) |
44 |
| - |
45 |
| -launch_cs_command( |
46 |
| - cmd_id, |
47 |
| - xlogin=xlogin, |
48 |
| - inputs={}, |
49 |
| - project_id="dummydicomproject", |
50 |
| - session_id="dummydicomsession", |
51 |
| -) |
| 13 | +def test_phi_finder(): |
| 14 | + result = runner.invoke( |
| 15 | + make, |
| 16 | + [ |
| 17 | + "xnat", |
| 18 | + ( |
| 19 | + f"{PKG_PATH}/specs/" |
| 20 | + "australian-imaging-service/quality-control/phi-finder.yaml" |
| 21 | + ), |
| 22 | + "--spec-root", |
| 23 | + f"{PKG_PATH}/specs", |
| 24 | + "--registry", |
| 25 | + "ghcr.io", |
| 26 | + "--for-localhost", |
| 27 | + "--use-local-packages", |
| 28 | + "--raise-errors", |
| 29 | + ], |
| 30 | + ) |
| 31 | + |
| 32 | + assert not result.exit_code, show_cli_trace(result) |
| 33 | + |
| 34 | + xlogin = xnat4tests.connect() |
| 35 | + |
| 36 | + cmd_id = install_cs_command( |
| 37 | + "ghcr.io/australian-imaging-service/quality-control.phi-finder:2025.7.2", |
| 38 | + xlogin, |
| 39 | + enable=True, |
| 40 | + projects_to_enable=["dummydicomproject"], |
| 41 | + replace_existing=True, |
| 42 | + command_name="phi-finder", |
| 43 | + ) |
| 44 | + |
| 45 | + launch_cs_command( |
| 46 | + cmd_id, |
| 47 | + xlogin=xlogin, |
| 48 | + inputs={}, |
| 49 | + project_id="dummydicomproject", |
| 50 | + session_id="dummydicomsession", |
| 51 | + ) |
0 commit comments