Skip to content

Commit

Permalink
remove bucket lifecycle docs of negative days
Browse files Browse the repository at this point in the history
  • Loading branch information
lihsai0 committed Nov 30, 2023
1 parent 899b654 commit 2f81cc1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
24 changes: 8 additions & 16 deletions src/Qiniu/Storage/BucketManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,10 @@ public function listFilesv2(
* @param string $prefix 同一个 bucket 里面前缀不能重复
* @param int $delete_after_days 指定上传文件多少天后删除,指定为0表示不删除,
* 大于0表示多少天后删除,需大于 to_line_after_days
* @param int $to_line_after_days 指定文件上传多少天后转低频存储。指定为0表示
* 不转低频存储,小于0表示上传的文件立即变低频存储
* @param int $to_archive_ir_after_days 指定文件上传多少天后转归档直读。指定为0表示
* 不转归档直读,小于0表示上传的文件立即变归档直读
* @param int $to_archive_after_days 指定文件上传多少天后转归档存储。指定为0表示
* 不转归档存储,小于0表示上传的文件立即变归档存储
* @param int $to_deep_archive_after_days 指定文件上传多少天后转深度归档存储。指定为0表示
* 不转深度归档存储,小于0表示上传的文件立即变深度归档存储
* @param int $to_line_after_days 指定文件上传多少天后转低频存储。指定为0表示不转低频存储
* @param int $to_archive_ir_after_days 指定文件上传多少天后转归档直读。指定为0表示不转归档直读
* @param int $to_archive_after_days 指定文件上传多少天后转归档存储。指定为0表示不转归档存储
* @param int $to_deep_archive_after_days 指定文件上传多少天后转深度归档存储。指定为0表示不转深度归档存储
* @return array
*/
public function bucketLifecycleRule(
Expand Down Expand Up @@ -281,14 +277,10 @@ public function bucketLifecycleRule(
* @param string $prefix 同一个 bucket 里面前缀不能重复
* @param int $delete_after_days 指定上传文件多少天后删除,指定为0表示不删除,
* 大于0表示多少天后删除,需大于 to_line_after_days
* @param int $to_line_after_days 指定文件上传多少天后转低频存储。指定为0表示不
* 转低频存储,小于0表示上传的文件立即变低频存储
* @param int $to_archive_ir_after_days 指定文件上传多少天后转归档只读。指定为0表示不
* 转归档只读,小于0表示上传的文件立即变归档只读
* @param int $to_archive_after_days 指定文件上传多少天后转归档存储。指定为0表示
* 不转归档存储,小于0表示上传的文件立即变归档存储
* @param int $to_deep_archive_after_days 指定文件上传多少天后转深度归档存储。指定为0表示
* 不转深度归档存储,小于0表示上传的文件立即变深度归档存储
* @param int $to_line_after_days 指定文件上传多少天后转低频存储。指定为0表示不转低频存储
* @param int $to_archive_ir_after_days 指定文件上传多少天后转归档只读。指定为0表示不转归档只读
* @param int $to_archive_after_days 指定文件上传多少天后转归档存储。指定为0表示不转归档存储
* @param int $to_deep_archive_after_days 指定文件上传多少天后转深度归档存储。指定为0表示不转深度归档存储
* @return array
*/
public function updateBucketLifecycleRule(
Expand Down
5 changes: 3 additions & 2 deletions tests/Qiniu/Tests/BucketTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public static function prepareEnvironment()

global $testAuth;
$config = new Config();
$config->setUcHost('kodo-qa.bucket.jfcs-k8s-qa2.qiniu.io');
self::$bucketManager = new BucketManager($testAuth, $config);

global $dummyAuth;
Expand Down Expand Up @@ -206,7 +207,7 @@ public function testBucketLifecycleRule()
75,
80,
85,
73
78
);
$this->assertNull($error);
$this->assertNotNull($ret);
Expand All @@ -226,7 +227,7 @@ public function testBucketLifecycleRule()
$this->assertEquals('update-' . self::$bucketLifeRulePrefix, $rule["prefix"]);
$this->assertEquals(90, $rule["delete_after_days"]);
$this->assertEquals(75, $rule["to_line_after_days"]);
$this->assertEquals(73, $rule["to_archive_ir_after_days"]);
$this->assertEquals(78, $rule["to_archive_ir_after_days"]);
$this->assertEquals(80, $rule["to_archive_after_days"]);
$this->assertEquals(85, $rule["to_deep_archive_after_days"]);

Expand Down

0 comments on commit 2f81cc1

Please sign in to comment.