mirror of
https://github.com/minio/minio.git
synced 2025-11-25 20:16:10 -05:00
Add support for new policy conditions (#7024)
This PR implements following condition types - StringEqualsIgnoreCase and StringNotEqualsIgnoreCase - BinaryEquals
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user