Skip to content

Commit

Permalink
Updated Tea (#7)
Browse files Browse the repository at this point in the history
* Updated Tea
* Updated Expiration for Tests
  • Loading branch information
aliguyong authored Feb 15, 2020
1 parent 503b3a4 commit cfb38ae
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG

## 1.0.2 - 2020-02-14
- Update Tea.

## 1.0.1 - 2019-12-30
- Supported get `Role Name` automatically.

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"mtdowling/jmespath.php": "^2.4",
"adbario/php-dot-notation": "^2.2",
"clagiordano/weblibs-configmanager": "^1.0",
"httpx/tea": "^2.0"
"alibabacloud/tea": "^3.0"
},
"require-dev": {
"ext-spl": "*",
Expand Down
2 changes: 1 addition & 1 deletion src/Providers/EcsRamRoleProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use AlibabaCloud\Credentials\StsCredential;
use Exception;
use GuzzleHttp\Exception\GuzzleException;
use HttpX\Tea\Response;
use AlibabaCloud\Tea\Response;
use InvalidArgumentException;
use Psr\Http\Message\ResponseInterface;
use RuntimeException;
Expand Down
2 changes: 1 addition & 1 deletion src/Request/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Middleware;
use GuzzleHttp\Psr7\Uri;
use HttpX\Tea\Response;
use AlibabaCloud\Tea\Response;
use Psr\Http\Message\ResponseInterface;

/**
Expand Down
14 changes: 7 additions & 7 deletions tests/Unit/EcsRamRoleCredentialTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function testDefault()
{
$this->credential = new EcsRamRoleCredential();
$result = [
'Expiration' => '2020-02-02 11:11:11',
'Expiration' => '2049-10-01 00:00:00',
'AccessKeyId' => 'foo',
'AccessKeySecret' => 'bar',
'SecurityToken' => 'token',
Expand All @@ -65,7 +65,7 @@ public function testDefault()
self::assertEquals('foo', $this->credential->getAccessKeyId());
self::assertEquals('bar', $this->credential->getAccessKeySecret());
self::assertEquals('token', $this->credential->getSecurityToken());
self::assertEquals(strtotime('2020-02-02 11:11:11'), $this->credential->getExpiration());
self::assertEquals(strtotime('2049-10-01 00:00:00'), $this->credential->getExpiration());
}

/**
Expand Down Expand Up @@ -119,7 +119,7 @@ public function testDefaultEmpty()
public function testSts()
{
$result = [
'Expiration' => '2020-02-02 11:11:11',
'Expiration' => '2049-10-01 00:00:00',
'AccessKeyId' => 'foo',
'AccessKeySecret' => 'bar',
'SecurityToken' => 'token',
Expand All @@ -129,7 +129,7 @@ public function testSts()
self::assertEquals('foo', $this->credential->getAccessKeyId());
self::assertEquals('bar', $this->credential->getAccessKeySecret());
self::assertEquals('token', $this->credential->getSecurityToken());
self::assertEquals(strtotime('2020-02-02 11:11:11'), $this->credential->getExpiration());
self::assertEquals(strtotime('2049-10-01 00:00:00'), $this->credential->getExpiration());
}

/**
Expand All @@ -141,7 +141,7 @@ public function testSts()
public function testStsIncomplete()
{
$result = [
'Expiration' => '2020-02-02 11:11:11',
'Expiration' => '2049-10-01 00:00:00',
'AccessKeyId' => 'foo',
];
$credential = new EcsRamRoleCredential('EcsRamRoleTest2');
Expand All @@ -160,7 +160,7 @@ public function testStsIncomplete()
public function testSts404()
{
$result = [
'Expiration' => '2020-02-02 11:11:11',
'Expiration' => '2049-10-01 00:00:00',
'AccessKeyId' => 'foo',
];
$credential = new EcsRamRoleCredential('EcsRamRoleTest3');
Expand All @@ -179,7 +179,7 @@ public function testSts404()
public function testSts500()
{
$result = [
'Expiration' => '2020-02-02 11:11:11',
'Expiration' => '2049-10-01 00:00:00',
'AccessKeyId' => 'foo',
];

Expand Down

0 comments on commit cfb38ae

Please sign in to comment.