Skip to content

Commit

Permalink
add test for cors-options, lifecycle, website commands
Browse files Browse the repository at this point in the history
  • Loading branch information
taowei.wtw committed Jun 13, 2019
1 parent 85a3171 commit dab1e26
Show file tree
Hide file tree
Showing 6 changed files with 964 additions and 29 deletions.
58 changes: 33 additions & 25 deletions lib/bucket_lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,21 @@ var specChineseBucketLifeCycle = SpecText{
<?xml version="1.0" encoding="UTF-8"?>
<LifecycleConfiguration>
<Rule>
<ID>a1f08f0d-1653-4092-9647-9cef6368ccbd</ID>
<Prefix>testdelete</Prefix>
<Status>Enabled</Status>
<Expiration>
<Days>240</Days>
</Expiration>
<AbortMultipartUpload>
<Days>30</Days>
</AbortMultipartUpload>
</Rule>
<Rule>
<ID>RuleID</ID>
<Prefix>Prefix</Prefix>
<Status>Status</Status>
<Expiration>
<Days>Days</Days>
</Expiration>
<Transition>
<Days>Days</Days>
<StorageClass>StorageClass</StorageClass>
</Transition>
<AbortMultipartUpload>
<Days>Days</Days>
</AbortMultipartUpload>
</Rule>
</LifecycleConfiguration>
2) ossutil lifecycle --method get oss://bucket [local_xml_file]
Expand All @@ -68,7 +72,7 @@ var specChineseBucketLifeCycle = SpecText{
}

var specEnglishBucketLifeCycle = SpecText{
synopsisText: "Setget or delete bucket lifecycle configuration",
synopsisText: "Set, get or delete bucket lifecycle configuration",

paramText: "bucket_url lifecycle [options]",

Expand All @@ -78,8 +82,8 @@ var specEnglishBucketLifeCycle = SpecText{
ossuitl lifecycle --method delete oss://bucket
`,
detailHelpText: `
lifecycle command can setget and delete the lifecycle configuration of the oss bucket by
set method option value to put, get,delete
lifecycle command can set, get and delete the lifecycle configuration of the oss bucket by
set method option value to put, get, delete
Usage:
There are three usages for this command:
Expand All @@ -91,17 +95,21 @@ Usage:
<?xml version="1.0" encoding="UTF-8"?>
<LifecycleConfiguration>
<Rule>
<ID>a1f08f0d-1653-4092-9647-9cef6368ccbd</ID>
<Prefix>testdelete</Prefix>
<Status>Enabled</Status>
<Expiration>
<Days>240</Days>
</Expiration>
<AbortMultipartUpload>
<Days>30</Days>
</AbortMultipartUpload>
</Rule>
<Rule>
<ID>RuleID</ID>
<Prefix>Prefix</Prefix>
<Status>Status</Status>
<Expiration>
<Days>Days</Days>
</Expiration>
<Transition>
<Days>Days</Days>
<StorageClass>StorageClass</StorageClass>
</Transition>
<AbortMultipartUpload>
<Days>Days</Days>
</AbortMultipartUpload>
</Rule>
</LifecycleConfiguration>
2) ossutil lifecycle --method get oss://bucket [local_xml_file]
Expand Down

0 comments on commit dab1e26

Please sign in to comment.