Skip to content

Instantly share code, notes, and snippets.

@thbar
Last active August 29, 2015 14:17
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thbar/8818a919fed3bf1bfc30 to your computer and use it in GitHub Desktop.
Save thbar/8818a919fed3bf1bfc30 to your computer and use it in GitHub Desktop.
Production sanity test to verify that S3 buckets remain private over time
def buckets
[
'myapp-production-backups',
'myapp-staging-backups',
'myapp-s3-logs'
]
end
def test_buckets_subdomain_private
buckets.each do |bucket_name|
subdomain_url = "http://#{bucket_name}.s3.amazonaws.com/"
assert_includes(`curl --silent --location #{subdomain_url}`, 'AccessDenied')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment