Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
pass in creds as config variable
Browse files Browse the repository at this point in the history
  • Loading branch information
parkedwards committed Sep 19, 2023
1 parent 54fa575 commit 583210f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/test_vertex_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,10 @@ async def test_validate_empty_job_spec(self, gcp_credentials):
base_job_template = VertexAIWorker.get_default_base_job_template()
base_job_template["job_configuration"]["job_spec"] = {}
base_job_template["job_configuration"]["region"] = "us-central1"
base_job_template["job_configuration"]["credentials"] = gcp_credentials

with pytest.raises(pydantic.ValidationError) as excinfo:
await VertexAIWorkerJobConfiguration.from_template_and_values(
base_job_template, {}
base_job_template, {"credentials": gcp_credentials}
)

assert excinfo.value.errors() == [
Expand Down Expand Up @@ -87,11 +86,10 @@ async def test_validate_incomplete_worker_pool_spec(self, gcp_credentials):
],
}
base_job_template["job_configuration"]["region"] = "us-central1"
base_job_template["job_configuration"]["credentials"] = gcp_credentials

with pytest.raises(pydantic.ValidationError) as excinfo:
await VertexAIWorkerJobConfiguration.from_template_and_values(
base_job_template, {}
base_job_template, {"credentials": gcp_credentials}
)

assert excinfo.value.errors() == [
Expand Down

0 comments on commit 583210f

Please sign in to comment.