diff --git a/samcli/commands/deploy/deploy_context.py b/samcli/commands/deploy/deploy_context.py index e2aa23a058..c482c98757 100644 --- a/samcli/commands/deploy/deploy_context.py +++ b/samcli/commands/deploy/deploy_context.py @@ -35,7 +35,7 @@ class DeployContext: MSG_EXECUTE_SUCCESS = "\nSuccessfully created/updated stack - {stack_name} in {region}\n" - MSG_CONFIRM_CHANGESET = "Confirm deploying?" + MSG_CONFIRM_CHANGESET = "Deploy this changeset?" MSG_CONFIRM_CHANGESET_HEADER = "\nPreviewing CloudFormation changeset before deployment" def __init__( diff --git a/samcli/commands/package/exceptions.py b/samcli/commands/package/exceptions.py index 7775949fcd..51d3811915 100644 --- a/samcli/commands/package/exceptions.py +++ b/samcli/commands/package/exceptions.py @@ -87,6 +87,6 @@ class BucketNotSpecifiedError(UserException): def __init__(self, **kwargs): self.kwargs = kwargs - message_fmt = "\nS3 Bucket not specified, use --s3-bucket to specify a bucket name" + message_fmt = "\nS3 Bucket not specified, use --s3-bucket to specify a bucket name or run sam deploy --guided" super(BucketNotSpecifiedError, self).__init__(message=message_fmt.format(**self.kwargs)) diff --git a/tests/unit/lib/package/test_s3_uploader.py b/tests/unit/lib/package/test_s3_uploader.py index a2aef1e008..496d9db08c 100644 --- a/tests/unit/lib/package/test_s3_uploader.py +++ b/tests/unit/lib/package/test_s3_uploader.py @@ -154,9 +154,10 @@ def test_s3_upload_no_bucket(self): ) s3_uploader.artifact_metadata = {"a": "b"} remote_path = Path.joinpath(Path(os.getcwd()), Path("tmp")) - with self.assertRaises(BucketNotSpecifiedError): + with self.assertRaises(BucketNotSpecifiedError) as ex: with tempfile.NamedTemporaryFile(mode="w", delete=False) as f: s3_uploader.upload(f.name, remote_path) + self.assertEqual(BucketNotSpecifiedError().message, str(ex)) def test_s3_upload_with_dedup(self): s3_uploader = S3Uploader(