mirror of
https://github.com/minio/minio.git
synced 2024-12-25 22:55:54 -05:00
The test fails without the change. Also, removed a duplicate test case involving lifecycle config with no rules.
This commit is contained in:
parent
02e93fd6ba
commit
4c46668da8
@ -120,11 +120,15 @@ func TestParseAndValidateLifecycleConfig(t *testing.T) {
|
|||||||
expectedParsingErr: errDuplicatedXMLTag,
|
expectedParsingErr: errDuplicatedXMLTag,
|
||||||
expectedValidationErr: nil,
|
expectedValidationErr: nil,
|
||||||
},
|
},
|
||||||
{ // lifecycle config with no rules
|
{ // lifecycle config without prefixes
|
||||||
inputConfig: `<LifecycleConfiguration>
|
inputConfig: `<LifecycleConfiguration>
|
||||||
|
<Rule>
|
||||||
|
<Expiration><Days>3</Days></Expiration>
|
||||||
|
<Status>Enabled</Status>
|
||||||
|
</Rule>
|
||||||
</LifecycleConfiguration>`,
|
</LifecycleConfiguration>`,
|
||||||
expectedParsingErr: nil,
|
expectedParsingErr: nil,
|
||||||
expectedValidationErr: errLifecycleNoRule,
|
expectedValidationErr: nil,
|
||||||
},
|
},
|
||||||
{ // lifecycle config with rules having overlapping prefix
|
{ // lifecycle config with rules having overlapping prefix
|
||||||
inputConfig: `<LifecycleConfiguration><Rule><ID>rule1</ID><Status>Enabled</Status><Filter><Prefix>/a/b</Prefix></Filter><Expiration><Days>3</Days></Expiration></Rule><Rule><ID>rule2</ID><Status>Enabled</Status><Filter><And><Prefix>/a/b/c</Prefix><Tag><Key>key1</Key><Value>val1</Value></Tag></And></Filter><Expiration><Days>3</Days></Expiration></Rule></LifecycleConfiguration> `,
|
inputConfig: `<LifecycleConfiguration><Rule><ID>rule1</ID><Status>Enabled</Status><Filter><Prefix>/a/b</Prefix></Filter><Expiration><Days>3</Days></Expiration></Rule><Rule><ID>rule2</ID><Status>Enabled</Status><Filter><And><Prefix>/a/b/c</Prefix><Tag><Key>key1</Key><Value>val1</Value></Tag></And></Filter><Expiration><Days>3</Days></Expiration></Rule></LifecycleConfiguration> `,
|
||||||
|
Loading…
Reference in New Issue
Block a user