Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaelvll committed Apr 4, 2024
1 parent 6947d53 commit a415639
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- tests/test_optimizer_random_dag.py
- tests/test_storage.py
- tests/test_wheels.py
- tests/test_spot_serve.py
- tests/test_job_serve.py
- tests/test_yaml_parser.py
runs-on: ubuntu-latest
steps:
Expand Down
6 changes: 3 additions & 3 deletions tests/test_spot_serve.py → tests/test_job_serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,23 +261,23 @@ def test_cancel_on_spot_controller(self, _mock_cluster_state,
@pytest.mark.timeout(60)
def test_cancel(self, _mock_db_conn):
cli_runner = cli_testing.CliRunner()
result = cli_runner.invoke(cli.spot_cancel, ['-a'])
result = cli_runner.invoke(cli.job_cancel, ['-a'])
assert result.exit_code == 1
assert controller_utils.Controllers.JOB_CONTROLLER.value.default_hint_if_non_existent in str(
result.output), (result.exception, result.output, result.exc_info)

@pytest.mark.timeout(60)
def test_logs(self, _mock_db_conn):
cli_runner = cli_testing.CliRunner()
result = cli_runner.invoke(cli.spot_logs, ['1'])
result = cli_runner.invoke(cli.job_logs, ['1'])
assert result.exit_code == 1
assert controller_utils.Controllers.JOB_CONTROLLER.value.default_hint_if_non_existent in str(
result.output), (result.exception, result.output, result.exc_info)

@pytest.mark.timeout(60)
def test_queue(self, _mock_db_conn):
cli_runner = cli_testing.CliRunner()
result = cli_runner.invoke(cli.spot_queue)
result = cli_runner.invoke(cli.job_queue)
assert result.exit_code == 0
assert controller_utils.Controllers.JOB_CONTROLLER.value.default_hint_if_non_existent in str(
result.output), (result.exception, result.output, result.exc_info)
Expand Down

0 comments on commit a415639

Please sign in to comment.