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 @@ -159,7 +159,37 @@ def test_cli_run_service_uris(
159159 tmp_path : Path ,
160160 monkeypatch : pytest .MonkeyPatch ,
161161 cli_args : list ,
162+
163+
162164 expected_session_uri : Optional [str ],
165+ tmp_path : Path , monkeypatch : pytest .MonkeyPatch
166+ ) -> None :
167+ """--python_version should be forwarded to cli_deploy.to_gke."""
168+ rec = _Recorder ()
169+ monkeypatch .setattr (cli_tools_click .cli_deploy , "to_gke" , rec )
170+
171+ agent_dir = tmp_path / "agent_gke_pyver"
172+ agent_dir .mkdir ()
173+ runner = CliRunner ()
174+ result = runner .invoke (
175+ cli_tools_click .main ,
176+ [
177+ "deploy" ,
178+ "gke" ,
179+ "--project" ,
180+ "test-proj" ,
181+ "--region" ,
182+ "us-central1" ,
183+ "--cluster_name" ,
184+ "my-cluster" ,
185+ "--python_version" ,
186+ "3.13" ,
187+ str (agent_dir ),
188+ ],
189+ )
190+ assert result .exit_code == 0
191+ assert rec .calls , "cli_deploy.to_gke must be invoked"
192+ assert rec .calls [0 ][1 ].get ("python_version" ) == "3.13"
163193 expected_artifact_uri : Optional [str ],
164194 expected_memory_uri : Optional [str ],
165195) -> None :
You can’t perform that action at this time.
0 commit comments