Skip to content

Commit f6a4082

Browse files
committed
fix testGetCdnLogList of CdnManagerTest
1 parent 31db400 commit f6a4082

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

tests/Qiniu/Tests/CdnManagerTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,10 @@ public function testGetFluxData()
121121

122122
public function testGetCdnLogList()
123123
{
124-
list($ret, $err) = $this->cdnManager->getCdnLogList(array('fake.qiniu.com'), $this->testLogDate);
125-
$this->assertNotNull($err);
126-
$this->assertNull($ret);
124+
$domain = getenv('QINIU_TEST_DOMAIN');
125+
list($ret, $err) = $this->cdnManager->getCdnLogList(array($domain), $this->testLogDate);
126+
$this->assertNull($err);
127+
$this->assertNotNull($ret);
127128
}
128129

129130
public function testCreateTimestampAntiLeechUrl()

tests/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
$testStartDate = '2020-08-18';
1616
$testEndDate = '2020-08-19';
1717
$testGranularity = 'day';
18-
$testLogDate = '2020-08-18';
18+
$testLogDate = date('Y-m-d',strtotime("-1 days"));
1919

2020
$bucketNameBC = 'phpsdk-bc';
2121
$bucketNameNA = 'phpsdk-na';

0 commit comments

Comments
 (0)