File tree Expand file tree Collapse file tree
tests/unittests/cli/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -878,6 +878,15 @@ def _print_agent_engine_url(resource_name: str) -> None:
878878 )
879879
880880
881+ def _print_gemini_enterprise_hint () -> None :
882+ """Prints a pointer to the Gemini Enterprise registration docs."""
883+ click .secho (
884+ 'To make this agent available in Gemini Enterprise, register it by'
885+ ' following:\n https://docs.cloud.google.com/gemini/enterprise/docs/register-and-manage-an-adk-agent\n ' ,
886+ fg = 'cyan' ,
887+ )
888+
889+
881890def to_agent_engine (
882891 * ,
883892 agent_folder : str ,
@@ -1322,6 +1331,7 @@ def create_dockerfile_for_agent_engine(resource_name: str) -> None:
13221331 click .secho (f'Cleaned up the instance: { resource_name } ' , fg = 'green' )
13231332 raise e
13241333 _print_agent_engine_url (resource_name )
1334+ _print_gemini_enterprise_hint ()
13251335 finally :
13261336 temp_folder_path = os .path .join (parent_folder , temp_folder )
13271337 click .echo (f'Cleaning up the temp folder: { temp_folder_path } ' )
Original file line number Diff line number Diff line change @@ -250,6 +250,19 @@ def test_print_agent_engine_url() -> None:
250250 assert "playground" in call_args
251251
252252
253+ def test_print_gemini_enterprise_hint () -> None :
254+ """It should print a pointer to the Gemini Enterprise registration docs."""
255+ with mock .patch ("click.secho" ) as mocked_secho :
256+ cli_deploy ._print_gemini_enterprise_hint ()
257+ mocked_secho .assert_called_once ()
258+ call_args = mocked_secho .call_args [0 ][0 ]
259+ assert "Gemini Enterprise" in call_args
260+ assert (
261+ "https://docs.cloud.google.com/gemini/enterprise/docs/register-and-manage-an-adk-agent"
262+ in call_args
263+ )
264+
265+
253266@pytest .mark .parametrize ("include_requirements" , [True , False ])
254267def test_to_agent_engine_happy_path (
255268 monkeypatch : pytest .MonkeyPatch ,
You can’t perform that action at this time.
0 commit comments