Test for --dry-run against --public, refs #42

pull/45/head
Simon Willison 2021-12-06 23:09:53 -08:00
rodzic f5bc18d4ef
commit ea13a98a97
2 zmienionych plików z 11 dodań i 1 usunięć

Wyświetl plik

@ -285,7 +285,7 @@ def create(
)
)
if bucket_policy:
click.echo("... then the following bucket policy:")
click.echo("... then attach the following bucket policy to it:")
click.echo(json.dumps(bucket_policy, indent=4))
else:
s3.create_bucket(Bucket=bucket, **kwargs)

Wyświetl plik

@ -51,6 +51,16 @@ Would ensure role: 's3-credentials.AmazonS3FullAccess'
Would assume role using following policy for 1200 seconds:*"""
),
),
(
["--public"],
(
"""Would create bucket: 'my-bucket'
... then attach the following bucket policy to it:*
Would create user: 's3.read-write.my-bucket' with permissions boundary: 'arn:aws:iam::aws:policy/AmazonS3FullAccess'
Would attach policy called 's3.read-write.my-bucket' to user 's3.read-write.my-bucket', details:*
Would call create access key for user 's3.read-write.my-bucket'"""
),
),
),
)
def test_dry_run(options, expected):