From de0e6791be1a45a2cbc517953b620d6903854db6 Mon Sep 17 00:00:00 2001 From: "qiankun.yqk" Date: Mon, 31 Oct 2016 23:56:34 +0800 Subject: [PATCH] add image url --- src/OSS/OssClient.php | 1 + tests/OSS/Tests/BucketLiveChannelTest.php | 13 ++++--------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/OSS/OssClient.php b/src/OSS/OssClient.php index dd27c25b..80d31cc3 100644 --- a/src/OSS/OssClient.php +++ b/src/OSS/OssClient.php @@ -2088,6 +2088,7 @@ private function generateSignableQueryStringParam($options) 'response-content-encoding', 'response-expires', 'response-content-disposition', + 'x-oss-process', self::OSS_UPLOAD_ID, self::OSS_CNAME_COMP, self::OSS_LIVE_CHANNEL_STATUS, diff --git a/tests/OSS/Tests/BucketLiveChannelTest.php b/tests/OSS/Tests/BucketLiveChannelTest.php index 6f535ba4..a1288e43 100644 --- a/tests/OSS/Tests/BucketLiveChannelTest.php +++ b/tests/OSS/Tests/BucketLiveChannelTest.php @@ -21,6 +21,7 @@ public function setUp() $this->bucketName = 'php-sdk-test-bucket-name-' . strval(rand(0, 10)); $this->client->createBucket($this->bucketName); Common::waitMetaSync(); + sleep(30); } public function tearDown() @@ -74,7 +75,6 @@ public function testPutLiveChannel() 'fragCount' => 5, 'playListName' => 'hello' )); - sleep(30); $info = $this->client->putBucketLiveChannel($this->bucketName, $config); $this->client->deleteBucketLiveChannel($this->bucketName, 'live-1'); @@ -94,7 +94,6 @@ public function testListLiveChannels() 'fragCount' => 5, 'playListName' => 'hello' )); - sleep(30); $this->client->putBucketLiveChannel($this->bucketName, $config); $config = new LiveChannelConfig(array( @@ -158,7 +157,6 @@ public function testDeleteLiveChannel() 'fragCount' => 5, 'playListName' => 'hello' )); - sleep(30); $this->client->putBucketLiveChannel($this->bucketName, $config); $this->client->deleteBucketLiveChannel($this->bucketName, $channelId); @@ -174,7 +172,6 @@ public function testGetLiveChannelUrl() $channelId = '90475'; $bucket = 'douyu'; $now = time(); - sleep(30); $url = $this->client->getLiveChannelUrl($bucket, $channelId, array( 'expires' => 900, 'params' => array( @@ -204,7 +201,6 @@ public function testLiveChannelInfo() 'fragCount' => 5, 'playListName' => 'hello' )); - sleep(30); $this->client->putBucketLiveChannel($this->bucketName, $config); $info = $this->client->getLiveChannelInfo($this->bucketName, $channelId); @@ -233,7 +229,6 @@ public function testPutLiveChannelStatus() 'fragCount' => 5, 'playListName' => 'hello' )); - sleep(30); $this->client->putBucketLiveChannel($this->bucketName, $config); $info = $this->client->getLiveChannelInfo($this->bucketName, $channelId); @@ -244,7 +239,7 @@ public function testPutLiveChannelStatus() $this->assertEquals(5, $info->getFragCount()); $this->assertEquals('playlist.m3u8', $info->getPlayListName()); $status = $this->client->getLiveChannelStatus($this->bucketName, $channelId); - $this->assertEquals('', $status->getStatus()); + $this->assertEquals('Idle', $status->getStatus()); $resp = $this->client->putLiveChannelStatus($this->bucketName, $channelId, "disabled"); @@ -257,7 +252,8 @@ public function testPutLiveChannelStatus() $this->assertEquals('playlist.m3u8', $info->getPlayListName()); $status = $this->client->getLiveChannelStatus($this->bucketName, $channelId); - $this->assertEquals('', $status->getStatus()); + //getLiveChannelInfo + $this->assertEquals('Disabled', $status->getStatus()); $this->client->deleteBucketLiveChannel($this->bucketName, $channelId); $list = $this->client->listBucketLiveChannels($this->bucketName, array( @@ -277,7 +273,6 @@ public function testLiveChannelHistory() 'fragCount' => 5, 'playListName' => 'hello' )); - sleep(30); $this->client->putBucketLiveChannel($this->bucketName, $config); $history = $this->client->getLiveChannelHistory($this->bucketName, $channelId);