From 22d7f3bce5e4bf78e8be9227e2d5dcb5a82aa1ce Mon Sep 17 00:00:00 2001 From: Matt Craddock <5796417+craddm@users.noreply.github.com> Date: Tue, 29 Oct 2024 15:10:27 +0000 Subject: [PATCH] add test for no pulumi config --- tests/commands/test_shm.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/commands/test_shm.py b/tests/commands/test_shm.py index 0ec3d9a55a..49d24f917f 100644 --- a/tests/commands/test_shm.py +++ b/tests/commands/test_shm.py @@ -90,3 +90,15 @@ def test_teardown_user_cancelled( result = runner.invoke(shm_command_group, ["teardown"], input="n") assert result.exit_code == 0 assert "cancelled" in result.stdout + + def test_teardown_no_pulumi_config( + self, + runner, + mock_azuresdk_get_subscription_name, # noqa: ARG002 + mock_pulumi_config_from_remote_fails, # noqa: ARG002 + mock_shm_config_from_remote, # noqa: ARG002 + mock_imperative_shm_teardown_then_exit, # noqa: ARG002 + ): + result = runner.invoke(shm_command_group, ["teardown"], input="y") + assert result.exit_code == 1 + assert "mock teardown" in result.stdout