Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
romasku committed Jul 9, 2021
1 parent 64574a1 commit 2516667
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/integration/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4492,6 +4492,8 @@ async def test_create_with_custom_volumes(
"uri": f"job://test-cluster/{regular_user.name}/{job_id}",
"restart_policy": "never",
"privileged": False,
"being_dropped": False,
"logs_removed": False,
}

response_payload = await jobs_client.long_polling_by_job_id(
Expand Down Expand Up @@ -4539,6 +4541,8 @@ async def test_create_with_custom_volumes(
"uri": f"job://test-cluster/{regular_user.name}/{job_id}",
"restart_policy": "never",
"privileged": False,
"being_dropped": False,
"logs_removed": False,
}

@pytest.mark.asyncio
Expand Down Expand Up @@ -4632,6 +4636,8 @@ async def test_job_failed(
"uri": f"job://test-cluster/{regular_user.name}/{job_id}",
"restart_policy": "never",
"privileged": False,
"being_dropped": False,
"logs_removed": False,
}

@pytest.mark.asyncio
Expand Down Expand Up @@ -4737,6 +4743,8 @@ async def test_create_gpu_model(
"uri": f"job://test-cluster/{regular_user.name}/{job_id}",
"restart_policy": "never",
"privileged": False,
"being_dropped": False,
"logs_removed": False,
}

@pytest.mark.asyncio
Expand Down Expand Up @@ -4836,6 +4844,8 @@ async def test_create_tpu_model(
"uri": f"job://test-cluster/{regular_user.name}/{job_id}",
"restart_policy": "never",
"privileged": False,
"being_dropped": False,
"logs_removed": False,
}


Expand Down
6 changes: 6 additions & 0 deletions tests/unit/test_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,8 @@ def test_to_primitive(
"restart_policy": "never",
"privileged": False,
"total_price_credits": "0",
"being_dropped": False,
"logs_removed": False,
}

def test_to_primitive_with_max_run_time(
Expand Down Expand Up @@ -916,6 +918,8 @@ def test_to_primitive_with_max_run_time(
"restart_policy": "never",
"privileged": False,
"total_price_credits": "0",
"being_dropped": False,
"logs_removed": False,
}

def test_to_primitive_with_tags(
Expand Down Expand Up @@ -1238,6 +1242,8 @@ def test_to_and_from_primitive(
"restart_policy": str(JobRestartPolicy.ALWAYS),
"privileged": False,
"total_price_credits": "0",
"being_dropped": False,
"logs_removed": False,
}
actual = Job.to_primitive(
Job.from_primitive(mock_orchestrator.config, expected)
Expand Down

0 comments on commit 2516667

Please sign in to comment.