From d1d410515521246f148cdfca19f9537d7b5ba4e6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Jun 2025 10:14:16 +0000 Subject: [PATCH 1/2] build(deps): bump stefanzweifel/git-auto-commit-action from 5 to 6 Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 5 to 6. - [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases) - [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/v5...v6) --- updated-dependencies: - dependency-name: stefanzweifel/git-auto-commit-action dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/vhs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vhs.yml b/.github/workflows/vhs.yml index bc513fa3..9921509f 100644 --- a/.github/workflows/vhs.yml +++ b/.github/workflows/vhs.yml @@ -32,7 +32,7 @@ jobs: path: ".github/tape_collection/cli_ssh.tape" # Add gifs to commit - - uses: stefanzweifel/git-auto-commit-action@v5 + - uses: stefanzweifel/git-auto-commit-action@v6 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: From a2d4526322c5ac9ae45f4353dcd2b08e2fbb2784 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dean=20Qui=C3=B1anola?= Date: Wed, 11 Jun 2025 23:56:04 -0700 Subject: [PATCH 2/2] fix: broken tests --- tests/test_cli/test_cli_groups/test_config_commands.py | 8 +++++++- tests/test_cli/test_cli_groups/test_exec_commands.py | 7 +++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/test_cli/test_cli_groups/test_config_commands.py b/tests/test_cli/test_cli_groups/test_config_commands.py index d9dbe3ba..70959cc0 100644 --- a/tests/test_cli/test_cli_groups/test_config_commands.py +++ b/tests/test_cli/test_cli_groups/test_config_commands.py @@ -100,9 +100,15 @@ def test_output_messages(self): def test_api_key_prompt(self): """Tests the API key prompt.""" - with patch("click.prompt", return_value="KEY") as mock_prompt: + with patch("click.prompt", return_value="KEY") as mock_prompt, patch( + "runpod.cli.groups.config.commands.set_credentials" + ) as mock_set_credentials, patch( + "runpod.cli.groups.config.commands.check_credentials", + return_value=(False, None) + ): result = self.runner.invoke(runpod_cli, ["config", "--profile", "test"]) mock_prompt.assert_called_with( " > RunPod API Key", hide_input=False, confirmation_prompt=False ) # pylint: disable=line-too-long + mock_set_credentials.assert_called_with("KEY", "test", overwrite=True) assert result.exit_code == 0 diff --git a/tests/test_cli/test_cli_groups/test_exec_commands.py b/tests/test_cli/test_cli_groups/test_exec_commands.py index 9b04528e..d8a0edf6 100644 --- a/tests/test_cli/test_cli_groups/test_exec_commands.py +++ b/tests/test_cli/test_cli_groups/test_exec_commands.py @@ -7,14 +7,15 @@ from unittest.mock import patch import click +from click.testing import CliRunner from runpod.cli.entry import runpod_cli class TestExecCommands(unittest.TestCase): """Tests for Runpod CLI exec commands.""" - def setUp(self): + self.runner = CliRunner() self.runner = click.testing.CliRunner() def test_remote_python_with_provided_pod_id(self): @@ -49,9 +50,7 @@ def test_remote_python_without_provided_pod_id_prompt(self): "runpod.cli.groups.exec.commands.python_over_ssh" ) as mock_python_over_ssh, patch( "runpod.cli.groups.exec.commands.get_session_pod", - side_effect=lambda: click.prompt( - "Please provide the pod ID", "prompted_pod_id" - ), + return_value="prompted_pod_id", ) as mock_get_pod_id: # pylint: disable=line-too-long mock_python_over_ssh.return_value = None result = self.runner.invoke(runpod_cli, ["exec", "python", temp_file.name])