Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
VukW committed Feb 12, 2024
1 parent 4bcea3e commit ad45a04
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cli/medperf/tests/entities/test_cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def test_cube_runs_command(self, mocker, timeout, setup, task):
)
mocker.patch(PATCH_CUBE.format("Cube.get_config"), side_effect=["", ""])
expected_cmd = (
f"mlcube run --mlcube={self.manifest_path} --task={task} "
f"mlcube --log-level debug run --mlcube={self.manifest_path} --task={task} "
+ f"--platform={self.platform} --network=none --mount=ro"
+ ' -Pdocker.cpu_args="-u $(id -u):$(id -g)"'
+ ' -Pdocker.gpu_args="-u $(id -u):$(id -g)"'
Expand All @@ -202,7 +202,7 @@ def test_cube_runs_command_with_rw_access(self, mocker, setup, task):
side_effect=["", ""],
)
expected_cmd = (
f"mlcube run --mlcube={self.manifest_path} --task={task} "
f"mlcube --log-level debug run --mlcube={self.manifest_path} --task={task} "
+ f"--platform={self.platform} --network=none"
+ ' -Pdocker.cpu_args="-u $(id -u):$(id -g)"'
+ ' -Pdocker.gpu_args="-u $(id -u):$(id -g)"'
Expand All @@ -222,7 +222,7 @@ def test_cube_runs_command_with_extra_args(self, mocker, setup, task):
spy = mocker.patch("pexpect.spawn", side_effect=mpexpect.spawn)
mocker.patch(PATCH_CUBE.format("Cube.get_config"), side_effect=["", ""])
expected_cmd = (
f"mlcube run --mlcube={self.manifest_path} --task={task} "
f"mlcube --log-level debug run --mlcube={self.manifest_path} --task={task} "
+ f'--platform={self.platform} --network=none --mount=ro test="test"'
+ ' -Pdocker.cpu_args="-u $(id -u):$(id -g)"'
+ ' -Pdocker.gpu_args="-u $(id -u):$(id -g)"'
Expand All @@ -245,7 +245,7 @@ def test_cube_runs_command_and_preserves_runtime_args(self, mocker, setup, task)
side_effect=["cpuarg cpuval", "gpuarg gpuval"],
)
expected_cmd = (
f"mlcube run --mlcube={self.manifest_path} --task={task} "
f"mlcube --log-level debug run --mlcube={self.manifest_path} --task={task} "
+ f"--platform={self.platform} --network=none --mount=ro"
+ ' -Pdocker.cpu_args="cpuarg cpuval -u $(id -u):$(id -g)"'
+ ' -Pdocker.gpu_args="gpuarg gpuval -u $(id -u):$(id -g)"'
Expand Down

0 comments on commit ad45a04

Please sign in to comment.