Skip to content

Commit 2c844a8

Browse files
vertex-sdk-botcopybara-github
authored andcommitted
chore: Update Skill Registry tests to target prod endpoints
PiperOrigin-RevId: 914404430
1 parent 5eae75c commit 2c844a8

4 files changed

Lines changed: 4 additions & 25 deletions

File tree

tests/unit/vertexai/genai/replays/test_skills_delete.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Tests the skills.delete() method against the autopush endpoint."""
1+
"""Tests the skills.delete() method against the prod endpoint."""
22

33
from tests.unit.vertexai.genai.replays import pytest_helper
44
from vertexai._genai import types
@@ -12,10 +12,6 @@
1212

1313

1414
def test_delete_skill(client, tmp_path):
15-
# Target the autopush sandbox endpoint for the Skill Registry API
16-
client._api_client._http_options.base_url = (
17-
"https://us-central1-autopush-aiplatform.sandbox.googleapis.com"
18-
)
1915

2016
# 1. Create a fresh unique skill first
2117
with open(tmp_path / "SKILL.md", "w") as f:

tests/unit/vertexai/genai/replays/test_skills_get.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Tests the skills.get() method against the autopush endpoint."""
1+
"""Tests the skills.get() method against the prod endpoint."""
22

33
from google.api_core import exceptions
44
from tests.unit.vertexai.genai.replays import pytest_helper
@@ -7,8 +7,6 @@
77
PROJECT_ID = "demo-project"
88
REGION = "us-central1"
99
SKILL_ID = "7184367305562783744"
10-
# target the autopush sandbox endpoint for the Skill Registry API
11-
ENDPOINT = f"{REGION}-autopush-aiplatform.sandbox.googleapis.com"
1210

1311

1412
pytestmark = pytest_helper.setup(
@@ -18,11 +16,8 @@
1816

1917

2018
def test_get_skill(client): # client fixture is injected by pytest_helper.setup
21-
"""Tests the skills.get() method against the autopush endpoint."""
19+
"""Tests the skills.get() method against the prod endpoint."""
2220

23-
client._api_client._http_options.base_url = (
24-
"https://us-central1-autopush-aiplatform.sandbox.googleapis.com"
25-
)
2621
skill_name = f"projects/{PROJECT_ID}/locations/{REGION}/skills/{SKILL_ID}"
2722

2823
try:

tests/unit/vertexai/genai/replays/test_skills_list.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Tests the skills.list() method against the autopush endpoint."""
1+
"""Tests the skills.list() method against the prod endpoint."""
22

33
from tests.unit.vertexai.genai.replays import pytest_helper
44
from vertexai._genai import types
@@ -10,10 +10,6 @@
1010

1111

1212
def test_list_skills(client):
13-
# Target the autopush sandbox endpoint for the Skill Registry API
14-
client._api_client._http_options.base_url = (
15-
"https://us-central1-autopush-aiplatform.sandbox.googleapis.com"
16-
)
1713

1814
skills = client.skills.list()
1915
for skill in skills:

tests/unit/vertexai/genai/replays/test_skills_update.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@
2828

2929

3030
def test_update_skill(client, tmp_path):
31-
# Target the autopush sandbox endpoint for the Skill Registry API
32-
client._api_client._http_options.base_url = (
33-
"https://us-central1-autopush-aiplatform.sandbox.googleapis.com"
34-
)
3531

3632
# 1. Create a fresh unique skill first
3733
with open(tmp_path / "SKILL.md", "w") as f:
@@ -61,10 +57,6 @@ def test_update_skill(client, tmp_path):
6157

6258

6359
def test_update_skill_with_zipped_bytes(client, tmp_path):
64-
# Target the autopush sandbox endpoint for the Skill Registry API
65-
client._api_client._http_options.base_url = (
66-
"https://us-central1-autopush-aiplatform.sandbox.googleapis.com"
67-
)
6860

6961
# 1. Create a fresh unique skill first
7062
with open(tmp_path / "SKILL.md", "w") as f:

0 commit comments

Comments
 (0)