Skip to content

Commit

Permalink
don't save generated ARNs for now, will save during init
Browse files Browse the repository at this point in the history
  • Loading branch information
elbayaaa committed Apr 20, 2021
1 parent 2c3ad8b commit d184e16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
4 changes: 0 additions & 4 deletions samcli/commands/pipeline/bootstrap/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,6 @@ def do_cli(
if bootstrapped:
stage.print_resources_summary()

stage.save_config_safe(
config_dir=PIPELINE_CONFIG_DIR, filename=PIPELINE_CONFIG_FILENAME, cmd_names=_get_command_names()
)


def _load_saved_pipeline_user_arn() -> Optional[str]:
samconfig: SamConfig = SamConfig(config_dir=PIPELINE_CONFIG_DIR, filename=PIPELINE_CONFIG_FILENAME)
Expand Down
9 changes: 3 additions & 6 deletions tests/unit/commands/pipeline/bootstrap/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,6 @@ def test_bootstrapping_normal_interactive_flow(
gc_instance.run.assert_called_once()
stage_instance.bootstrap.assert_called_once_with(confirm_changeset=True)
stage_instance.print_resources_summary.assert_called_once()
stage_instance.save_config_safe.assert_called_once_with(
config_dir=PIPELINE_CONFIG_DIR,
filename=PIPELINE_CONFIG_FILENAME,
cmd_names=PIPELINE_BOOTSTRAP_COMMAND_NAMES,
)

@patch("samcli.commands.pipeline.bootstrap.cli._get_command_names")
@patch("samcli.commands.pipeline.bootstrap.cli._load_saved_pipeline_user_arn")
Expand Down Expand Up @@ -209,7 +204,9 @@ def test_bootstrapping_will_confirm_before_creating_the_resources_unless_the_use

@patch("samcli.commands.pipeline.bootstrap.cli.SamConfig")
@patch("samcli.commands.pipeline.bootstrap.cli._get_command_names")
def test_load_saved_pipeline_user_arn_will_read_from_the_correct_file(self, get_command_names_mock, sam_config_mock):
def test_load_saved_pipeline_user_arn_will_read_from_the_correct_file(
self, get_command_names_mock, sam_config_mock
):
# setup
get_command_names_mock.return_value = PIPELINE_BOOTSTRAP_COMMAND_NAMES
sam_config_instance_mock = Mock()
Expand Down

0 comments on commit d184e16

Please sign in to comment.