Skip to content

Commit

Permalink
Merge 50829a7 into 3f41b0b
Browse files Browse the repository at this point in the history
  • Loading branch information
rsonghuster committed Oct 25, 2018
2 parents 3f41b0b + 50829a7 commit c22db9b
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions test/versioning_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ public function testInvokeFunciton() {
['aliasName' => 'test',
'versionId' => $v1,
'description' => 'test alias',
'additionalVersionWeight' => ["1" => 0.9],
'additionalVersionWeight' => [$v1 => 1],
]);

$ret = $this->fcClient->updateFunction(
Expand All @@ -552,7 +552,7 @@ public function testInvokeFunciton() {
array(
'handler' => 'index.handler',
'runtime' => 'php7.2',
'memorySize' => 256,
'memorySize' => 128,
'code' => array(
'zipFile' => base64_encode(file_get_contents(__DIR__ . '/new_index.zip')),
),
Expand All @@ -566,23 +566,23 @@ public function testInvokeFunciton() {
['aliasName' => 'prod',
'versionId' => $v2,
'description' => 'test alias',
'additionalVersionWeight' => ["1" => 0.8],
'additionalVersionWeight' => [$v2 => 1],
]);

$invkRet = $this->fcClient->invokeFunction($serviceName, $functionName);
$this->assertEquals($invkRet['data'], 'new hello world');

// $invkRet = $this->fcClient->invokeFunction($serviceName, $functionName, '', [], $v1);
// $this->assertEquals($invkRet['data'], 'new hello world');
$invkRet = $this->fcClient->invokeFunction($serviceName, $functionName, '', [], $v1);
$this->assertEquals($invkRet['data'], 'hello world');

// $invkRet = $this->fcClient->invokeFunction($serviceName, $functionName, '', [], "test");
// $this->assertEquals($invkRet['data'], 'new hello world');
$invkRet = $this->fcClient->invokeFunction($serviceName, $functionName, '', [], "test");
$this->assertEquals($invkRet['data'], 'hello world');

// $invkRet = $this->fcClient->invokeFunction($serviceName, $functionName, '', [], $v2);
// $this->assertEquals($invkRet['data'], 'new hello world');
$invkRet = $this->fcClient->invokeFunction($serviceName, $functionName, '', [], $v2);
$this->assertEquals($invkRet['data'], 'new hello world');

// $invkRet = $this->fcClient->invokeFunction($serviceName, $functionName, '', [], "prod");
// $this->assertEquals($invkRet['data'], 'new hello world');
$invkRet = $this->fcClient->invokeFunction($serviceName, $functionName, '', [], "prod");
$this->assertEquals($invkRet['data'], 'new hello world');

}

Expand Down

0 comments on commit c22db9b

Please sign in to comment.