Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
atheiman authored and stealthycoin committed Feb 4, 2022
1 parent 042b764 commit 365a789
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions awscli/customizations/cloudformation/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,13 @@ def _run_main(self, parsed_args, parsed_globals):
parameters, parsed_args.capabilities,
parsed_args.execute_changeset, parsed_args.role_arn,
parsed_args.notification_arns, s3_uploader,
tags, parsed_args.disable_rollback,
parsed_args.fail_on_empty_changeset)
tags, parsed_args.fail_on_empty_changeset,
parsed_args.disable_rollback)

def deploy(self, deployer, stack_name, template_str,
parameters, capabilities, execute_changeset, role_arn,
notification_arns, s3_uploader, tags, disable_rollback=False,
fail_on_empty_changeset=True):
notification_arns, s3_uploader, tags,
fail_on_empty_changeset=True, disable_rollback=False):
try:
result = deployer.create_and_wait_for_changeset(
stack_name=stack_name,
Expand Down
5 changes: 3 additions & 2 deletions tests/unit/customizations/cloudformation/test_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ def test_command_invoked(self, mock_yaml_parse):
fake_parameters,
None,
not self.parsed_args.no_execute_changeset,
True,
None,
[],
None,
fake_tags,
True,
True
)

Expand Down Expand Up @@ -207,6 +207,7 @@ def test_s3_uploader_is_configured_properly(self, s3UploaderMock,
[],
s3UploaderObject,
[{"Key": "tagkey1", "Value": "tagvalue1"}],
True,
True
)

Expand Down Expand Up @@ -259,7 +260,7 @@ def test_deploy_success(self):
tags=tags)

# since execute_changeset is set to True, deploy() will execute changeset
self.deployer.execute_changeset.assert_called_once_with(changeset_id, stack_name)
self.deployer.execute_changeset.assert_called_once_with(changeset_id, stack_name, False)
self.deployer.wait_for_execute.assert_called_once_with(stack_name, changeset_type)


Expand Down

0 comments on commit 365a789

Please sign in to comment.