1
0
Fork 0
mirror of synced 2024-06-26 10:10:57 +12:00

Updated tests

This commit is contained in:
Eldad Fux 2020-12-11 11:12:54 +02:00
parent c841acd220
commit 1f253c717e
7 changed files with 17 additions and 16 deletions

View file

@ -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'] ?? '';
@ -563,8 +563,6 @@ class FunctionsCustomServerTest extends Scope
'content-type' => 'application/json',
'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);

View 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

View file

@ -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.