Add support for new policy conditions (#7024)

This PR implements following condition types

- StringEqualsIgnoreCase and StringNotEqualsIgnoreCase
- BinaryEquals
This commit is contained in:
Harshavardhana
2018-12-26 17:39:30 -08:00
committed by GitHub
parent 2db22deb93
commit 4e4f855b30
14 changed files with 1593 additions and 62 deletions

View File

@@ -268,6 +268,11 @@ func TestFunctionsUnmarshalJSON(t *testing.T) {
case3Data := []byte(`{}`)
// Remove this test after supporting date conditions.
case4Data := []byte(`{
"DateEquals": { "aws:CurrentTime": "2013-06-30T00:00:00Z" }
}`)
testCases := []struct {
data []byte
expectedResult Functions
@@ -278,6 +283,8 @@ func TestFunctionsUnmarshalJSON(t *testing.T) {
{case2Data, NewFunctions(func6), false},
// empty condition error.
{case3Data, nil, true},
// unsupported condition error.
{case4Data, nil, true},
}
for i, testCase := range testCases {