Updated tests
This commit is contained in:
parent
c841acd220
commit
1f253c717e
7 changed files with 17 additions and 16 deletions
|
@ -478,7 +478,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
|
||||
/**
|
||||
* Command for rebuilding code packages:
|
||||
* bash tests/resources/functions/package.sh
|
||||
* bash tests/resources/functions/package-*.sh
|
||||
*/
|
||||
$envs = [
|
||||
[
|
||||
|
@ -521,7 +521,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
'timeout' => 15,
|
||||
]);
|
||||
|
||||
var_dump('http://'.gethostbyname(trim(`hostname`)).'/v1');
|
||||
// var_dump('http://'.gethostbyname(trim(`hostname`)).'/v1');
|
||||
|
||||
$functionId = $function['body']['$id'] ?? '';
|
||||
|
||||
|
@ -564,8 +564,6 @@ class FunctionsCustomServerTest extends Scope
|
|||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()));
|
||||
|
||||
var_dump($executions['body']);
|
||||
|
||||
$this->assertEquals($executions['headers']['status-code'], 200);
|
||||
$this->assertEquals($executions['body']['sum'], 1);
|
||||
$this->assertIsArray($executions['body']['executions']);
|
||||
|
|
14
tests/resources/functions/package-php.sh
Normal file
14
tests/resources/functions/package-php.sh
Normal file
|
@ -0,0 +1,14 @@
|
|||
|
||||
echo 'PHP Packaging...'
|
||||
|
||||
cp -r $(pwd)/tests/resources/functions/php $(pwd)/tests/resources/functions/packages/php
|
||||
|
||||
ls -ll $(pwd)/tests/resources/functions/packages/php
|
||||
|
||||
docker run --rm -v $(pwd)/tests/resources/functions/packages/php:/app -w /app composer:2.0 composer install --ignore-platform-reqs
|
||||
|
||||
docker run --rm -v $(pwd)/tests/resources/functions/packages/php:/app -w /app appwrite/env-php-8.0:1.0.0 tar -zcvf code.tar.gz .
|
||||
|
||||
mv $(pwd)/tests/resources/functions/packages/php/code.tar.gz $(pwd)/tests/resources/functions/php.tar.gz
|
||||
|
||||
rm -r $(pwd)/tests/resources/functions/packages/php
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
echo 'Python Packaging...'
|
||||
|
||||
cp -r $(pwd)/tests/resources/functions/python $(pwd)/tests/resources/functions/packages/python
|
||||
|
@ -9,15 +10,3 @@ docker run --rm -v $(pwd)/tests/resources/functions/packages/python:/app -w /app
|
|||
mv $(pwd)/tests/resources/functions/packages/python/code.tar.gz $(pwd)/tests/resources/functions/python.tar.gz
|
||||
|
||||
rm -r $(pwd)/tests/resources/functions/packages/python
|
||||
|
||||
echo 'PHP Packaging...'
|
||||
|
||||
cp -r $(pwd)/tests/resources/functions/php $(pwd)/tests/resources/functions/packages/php
|
||||
|
||||
docker run --rm -v $(pwd)/tests/resources/functions/packages/php:/app -w /app composer:2.0 composer install --ignore-platform-reqs
|
||||
|
||||
docker run --rm -v $(pwd)/tests/resources/functions/packages/php:/app -w /app appwrite/env-php-8.0:1.0.0 tar -zcvf code.tar.gz .
|
||||
|
||||
mv $(pwd)/tests/resources/functions/packages/php/code.tar.gz $(pwd)/tests/resources/functions/php.tar.gz
|
||||
|
||||
rm -r $(pwd)/tests/resources/functions/packages/php
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue