Last active
May 2, 2019 19:54
-
-
Save joatmon08/a573fc309d237b690afbff7e08b67b32 to your computer and use it in GitHub Desktop.
TDD-Infra-bucket-01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package test | |
| import ( | |
| "testing" | |
| "github.com/stretchr/testify/assert" | |
| ) | |
| const BucketPolicyFilePath = "../../policies/bucket.json" | |
| func TestPolicyHasVersionAndID(t *testing.T) { | |
| policy := setup(t, BucketPolicyFilePath) | |
| assert.Equal(t, "2012-10-17", policy.Version) | |
| assert.Equal(t, "MyBucketPolicy", policy.ID) | |
| assert.Equal(t, 3, len(policy.Statement)) | |
| assert.Equal(t, "AllowWriteUser", policy.Statement[0].Sid) | |
| assert.Equal(t, "AllowReadUser", policy.Statement[1].Sid) | |
| assert.Equal(t, "AllowAdminRole", policy.Statement[2].Sid) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment