Skip to content

Commit

Permalink
Add mock input for removing stage files
Browse files Browse the repository at this point in the history
  • Loading branch information
smokestacklightnin committed Dec 14, 2024
1 parent 52bfb1f commit bab0e7b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/tests_unit/test_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def test_upgrade_4_0(
monkeypatch,
):
def mock_input(prompt, **kwargs):
from _nebari.upgrade import TERRAFORM_REMOVE_TERRAFORM_STAGE_FILES_CONFIRMATION

# Mock different upgrade steps prompt answers
if prompt == "Have you deleted the Argo Workflows CRDs and service accounts?":
return True
Expand All @@ -68,6 +70,8 @@ def mock_input(prompt, **kwargs):
== "[bold]Would you like Nebari to assign the corresponding role to all of your current groups automatically?[/bold]"
):
return False
elif prompt == TERRAFORM_REMOVE_TERRAFORM_STAGE_FILES_CONFIRMATION:
return attempt_fixes
# All other prompts will be answered with "y"
else:
return True
Expand Down

0 comments on commit bab0e7b

Please sign in to comment.