Skip to content

Commit fc61684

Browse files
committed
test: update integration tests to use TOOLBOX_SERVER_URL_STABLE for server connections
1 parent bc21ccd commit fc61684

1 file changed

Lines changed: 28 additions & 28 deletions

File tree

packages/toolbox-adk/tests/integration/test_integration.py

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ async def test_load_toolset_with_default_protocol(self):
111111
async def test_load_toolset_with_explicit_protocol(self):
112112
"""Test initializing toolset with specific protocol (MCP_v20251125)."""
113113
toolset = ToolboxToolset(
114-
server_url=TOOLBOX_SERVER_URL,
114+
server_url=TOOLBOX_SERVER_URL_STABLE,
115115
toolset_name="my-toolset",
116116
credentials=CredentialStrategy.toolbox_identity(),
117117
protocol=Protocol.MCP_v20251125,
@@ -135,7 +135,7 @@ async def test_load_toolset_with_explicit_protocol(self):
135135

136136
async def test_partial_loading_by_names(self):
137137
toolset = ToolboxToolset(
138-
server_url=TOOLBOX_SERVER_URL,
138+
server_url=TOOLBOX_SERVER_URL_STABLE,
139139
tool_names=["get-n-rows"],
140140
credentials=CredentialStrategy.toolbox_identity(),
141141
)
@@ -155,7 +155,7 @@ async def test_partial_loading_by_names(self):
155155
async def test_bound_params_e2e(self):
156156
# Test binding param at toolset level
157157
toolset = ToolboxToolset(
158-
server_url=TOOLBOX_SERVER_URL,
158+
server_url=TOOLBOX_SERVER_URL_STABLE,
159159
tool_names=["get-n-rows"],
160160
bound_params={"num_rows": "2"},
161161
credentials=CredentialStrategy.toolbox_identity(),
@@ -171,7 +171,7 @@ async def test_bound_params_e2e(self):
171171

172172
async def test_3lo_flow_simulation(self):
173173
toolset = ToolboxToolset(
174-
server_url=TOOLBOX_SERVER_URL,
174+
server_url=TOOLBOX_SERVER_URL_STABLE,
175175
# Load a specific tool that we know the arguments for
176176
tool_names=["get-n-rows"],
177177
credentials=CredentialStrategy.user_identity(
@@ -268,7 +268,7 @@ async def test_3lo_flow_simulation(self):
268268
async def test_manual_token_integration(self):
269269
"""Test the MANUAL_TOKEN strategy."""
270270
toolset = ToolboxToolset(
271-
server_url=TOOLBOX_SERVER_URL,
271+
server_url=TOOLBOX_SERVER_URL_STABLE,
272272
toolset_name="my-toolset",
273273
credentials=CredentialStrategy.manual_token(token="fake-manual-token"),
274274
)
@@ -287,7 +287,7 @@ async def test_manual_credentials_integration(self):
287287
mock_creds.token = "fake-creds-token"
288288

289289
toolset = ToolboxToolset(
290-
server_url=TOOLBOX_SERVER_URL,
290+
server_url=TOOLBOX_SERVER_URL_STABLE,
291291
toolset_name="my-toolset",
292292
credentials=CredentialStrategy.manual_credentials(credentials=mock_creds),
293293
)
@@ -300,7 +300,7 @@ async def test_manual_credentials_integration(self):
300300
async def test_api_key_integration(self):
301301
"""Test the API_KEY strategy."""
302302
toolset = ToolboxToolset(
303-
server_url=TOOLBOX_SERVER_URL,
303+
server_url=TOOLBOX_SERVER_URL_STABLE,
304304
toolset_name="my-toolset",
305305
credentials=CredentialStrategy.api_key(key="my-key", header_name="x-foo"),
306306
)
@@ -336,7 +336,7 @@ async def test_adk_integration_optional_params(self):
336336

337337
# 3. Use in Toolset
338338
toolset = ToolboxToolset(
339-
server_url=TOOLBOX_SERVER_URL,
339+
server_url=TOOLBOX_SERVER_URL_STABLE,
340340
toolset_name="my-toolset",
341341
credentials=strategy,
342342
)
@@ -360,7 +360,7 @@ async def test_header_collision(self):
360360
creds_token = "Bearer strategy-token"
361361

362362
toolset = ToolboxToolset(
363-
server_url=TOOLBOX_SERVER_URL,
363+
server_url=TOOLBOX_SERVER_URL_STABLE,
364364
toolset_name="my-toolset",
365365
additional_headers={"Authorization": manual_override},
366366
credentials=CredentialStrategy.manual_token(token="strategy-token"),
@@ -394,7 +394,7 @@ async def test_load_toolset_specific(
394394
):
395395
"""Load a specific toolset"""
396396
toolset = ToolboxToolset(
397-
server_url=TOOLBOX_SERVER_URL,
397+
server_url=TOOLBOX_SERVER_URL_STABLE,
398398
toolset_name=toolset_name,
399399
credentials=CredentialStrategy.toolbox_identity(),
400400
)
@@ -409,7 +409,7 @@ async def test_load_toolset_specific(
409409
async def test_load_toolset_default(self):
410410
"""Load the default toolset, i.e. all tools."""
411411
toolset = ToolboxToolset(
412-
server_url=TOOLBOX_SERVER_URL,
412+
server_url=TOOLBOX_SERVER_URL_STABLE,
413413
credentials=CredentialStrategy.toolbox_identity(),
414414
)
415415
try:
@@ -432,7 +432,7 @@ async def test_load_toolset_default(self):
432432
async def test_run_tool(self):
433433
"""Invoke a tool."""
434434
toolset = ToolboxToolset(
435-
server_url=TOOLBOX_SERVER_URL,
435+
server_url=TOOLBOX_SERVER_URL_STABLE,
436436
tool_names=["get-n-rows"],
437437
credentials=CredentialStrategy.toolbox_identity(),
438438
)
@@ -454,7 +454,7 @@ async def test_run_tool(self):
454454
async def test_run_tool_missing_params(self):
455455
"""Invoke a tool with missing params."""
456456
toolset = ToolboxToolset(
457-
server_url=TOOLBOX_SERVER_URL,
457+
server_url=TOOLBOX_SERVER_URL_STABLE,
458458
tool_names=["get-n-rows"],
459459
credentials=CredentialStrategy.toolbox_identity(),
460460
)
@@ -473,7 +473,7 @@ async def test_run_tool_missing_params(self):
473473
async def test_run_tool_wrong_param_type(self):
474474
"""Invoke a tool with wrong param type."""
475475
toolset = ToolboxToolset(
476-
server_url=TOOLBOX_SERVER_URL,
476+
server_url=TOOLBOX_SERVER_URL_STABLE,
477477
tool_names=["get-n-rows"],
478478
credentials=CredentialStrategy.toolbox_identity(),
479479
)
@@ -497,7 +497,7 @@ class TestBindParams:
497497
async def test_bind_params(self):
498498
"""Bind a param to an existing tool."""
499499
toolset = ToolboxToolset(
500-
server_url=TOOLBOX_SERVER_URL,
500+
server_url=TOOLBOX_SERVER_URL_STABLE,
501501
tool_names=["get-n-rows"],
502502
bound_params={"num_rows": "3"},
503503
credentials=CredentialStrategy.toolbox_identity(),
@@ -519,7 +519,7 @@ async def test_bind_params(self):
519519
async def test_bind_params_callable(self):
520520
"""Bind a callable param to an existing tool."""
521521
toolset = ToolboxToolset(
522-
server_url=TOOLBOX_SERVER_URL,
522+
server_url=TOOLBOX_SERVER_URL_STABLE,
523523
tool_names=["get-n-rows"],
524524
bound_params={"num_rows": lambda: "3"},
525525
credentials=CredentialStrategy.toolbox_identity(),
@@ -545,7 +545,7 @@ class TestAuth:
545545
async def test_run_tool_unauth_with_auth(self, auth_token2: str):
546546
"""Tests running a tool that doesn't require auth, with auth provided."""
547547
toolset = ToolboxToolset(
548-
server_url=TOOLBOX_SERVER_URL,
548+
server_url=TOOLBOX_SERVER_URL_STABLE,
549549
tool_names=["get-row-by-id"],
550550
auth_token_getters={"my-test-auth": lambda: auth_token2},
551551
credentials=CredentialStrategy.toolbox_identity(),
@@ -562,7 +562,7 @@ async def test_run_tool_unauth_with_auth(self, auth_token2: str):
562562
async def test_run_multiple_tools_unauth_with_auth(self, auth_token2: str):
563563
"""Tests running multiple tools that don't require auth, verifying formatting of tool lists."""
564564
toolset = ToolboxToolset(
565-
server_url=TOOLBOX_SERVER_URL,
565+
server_url=TOOLBOX_SERVER_URL_STABLE,
566566
tool_names=["get-row-by-id", "search-rows"],
567567
auth_token_getters={"my-test-auth": lambda: auth_token2},
568568
credentials=CredentialStrategy.toolbox_identity(),
@@ -579,7 +579,7 @@ async def test_run_multiple_tools_unauth_with_auth(self, auth_token2: str):
579579
async def test_run_multiple_tools_partial_auth_usage(self, auth_token2: str):
580580
"""Tests that when some tokens are used and some aren't across diverse tools, only the truly unused tokens appear in the error."""
581581
toolset = ToolboxToolset(
582-
server_url=TOOLBOX_SERVER_URL,
582+
server_url=TOOLBOX_SERVER_URL_STABLE,
583583
tool_names=[
584584
"get-row-by-id-auth",
585585
"search-rows",
@@ -604,7 +604,7 @@ async def test_run_tool_no_auth(self):
604604
"""Tests running a tool requiring auth without providing auth."""
605605
# Note: We load it without auth getters. Invocation should fail.
606606
toolset = ToolboxToolset(
607-
server_url=TOOLBOX_SERVER_URL,
607+
server_url=TOOLBOX_SERVER_URL_STABLE,
608608
tool_names=["get-row-by-id-auth"],
609609
credentials=CredentialStrategy.toolbox_identity(),
610610
)
@@ -624,7 +624,7 @@ async def test_run_tool_no_auth(self):
624624
async def test_run_tool_wrong_auth(self, auth_token2: str):
625625
"""Tests running a tool with incorrect auth."""
626626
toolset = ToolboxToolset(
627-
server_url=TOOLBOX_SERVER_URL,
627+
server_url=TOOLBOX_SERVER_URL_STABLE,
628628
tool_names=["get-row-by-id-auth"],
629629
auth_token_getters={"my-test-auth": lambda: auth_token2},
630630
credentials=CredentialStrategy.toolbox_identity(),
@@ -645,7 +645,7 @@ async def test_run_tool_wrong_auth(self, auth_token2: str):
645645
async def test_run_tool_auth(self, auth_token1: str):
646646
"""Tests running a tool with correct auth."""
647647
toolset = ToolboxToolset(
648-
server_url=TOOLBOX_SERVER_URL,
648+
server_url=TOOLBOX_SERVER_URL_STABLE,
649649
tool_names=["get-row-by-id-auth"],
650650
auth_token_getters={"my-test-auth": lambda: auth_token1},
651651
credentials=CredentialStrategy.toolbox_identity(),
@@ -667,7 +667,7 @@ async def get_token_asynchronously():
667667
return auth_token1
668668

669669
toolset = ToolboxToolset(
670-
server_url=TOOLBOX_SERVER_URL,
670+
server_url=TOOLBOX_SERVER_URL_STABLE,
671671
tool_names=["get-row-by-id-auth"],
672672
auth_token_getters={"my-test-auth": get_token_asynchronously},
673673
credentials=CredentialStrategy.toolbox_identity(),
@@ -693,7 +693,7 @@ class TestOptionalParams:
693693
async def test_run_tool_with_optional_params_omitted(self):
694694
"""Invoke a tool providing only the required parameter."""
695695
toolset = ToolboxToolset(
696-
server_url=TOOLBOX_SERVER_URL,
696+
server_url=TOOLBOX_SERVER_URL_STABLE,
697697
tool_names=["search-rows"],
698698
credentials=CredentialStrategy.toolbox_identity(),
699699
)
@@ -712,7 +712,7 @@ async def test_run_tool_with_optional_params_omitted(self):
712712
async def test_run_tool_with_all_valid_params(self):
713713
"""Invoke a tool providing all parameters."""
714714
toolset = ToolboxToolset(
715-
server_url=TOOLBOX_SERVER_URL,
715+
server_url=TOOLBOX_SERVER_URL_STABLE,
716716
tool_names=["search-rows"],
717717
credentials=CredentialStrategy.toolbox_identity(),
718718
)
@@ -732,7 +732,7 @@ async def test_run_tool_with_all_valid_params(self):
732732
async def test_run_tool_with_missing_required_param(self):
733733
"""Invoke a tool without its required parameter."""
734734
toolset = ToolboxToolset(
735-
server_url=TOOLBOX_SERVER_URL,
735+
server_url=TOOLBOX_SERVER_URL_STABLE,
736736
tool_names=["search-rows"],
737737
credentials=CredentialStrategy.toolbox_identity(),
738738
)
@@ -757,7 +757,7 @@ class TestMapParams:
757757
async def test_run_tool_with_map_params(self):
758758
"""Invoke a tool with valid map parameters."""
759759
toolset = ToolboxToolset(
760-
server_url=TOOLBOX_SERVER_URL,
760+
server_url=TOOLBOX_SERVER_URL_STABLE,
761761
tool_names=["process-data"],
762762
credentials=CredentialStrategy.toolbox_identity(),
763763
)
@@ -788,7 +788,7 @@ async def test_run_tool_with_map_params(self):
788788
async def test_run_tool_with_wrong_map_value_type(self):
789789
"""Invoke a tool with a map parameter having the wrong value type."""
790790
toolset = ToolboxToolset(
791-
server_url=TOOLBOX_SERVER_URL,
791+
server_url=TOOLBOX_SERVER_URL_STABLE,
792792
tool_names=["process-data"],
793793
credentials=CredentialStrategy.toolbox_identity(),
794794
)

0 commit comments

Comments
 (0)