diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index 68574811a7..aaf581ebbb 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -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); diff --git a/tests/resources/functions/package-php.sh b/tests/resources/functions/package-php.sh new file mode 100644 index 0000000000..17aa8602e1 --- /dev/null +++ b/tests/resources/functions/package-php.sh @@ -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 \ No newline at end of file diff --git a/tests/resources/functions/package.sh b/tests/resources/functions/package-python.sh similarity index 54% rename from tests/resources/functions/package.sh rename to tests/resources/functions/package-python.sh index 3156ce434b..689ae7b7bd 100644 --- a/tests/resources/functions/package.sh +++ b/tests/resources/functions/package-python.sh @@ -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 \ No newline at end of file diff --git a/tests/resources/functions/packages/php/.gitkeep b/tests/resources/functions/packages/php/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/resources/functions/packages/python/.gitkeep b/tests/resources/functions/packages/python/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/resources/functions/php.tar.gz b/tests/resources/functions/php.tar.gz index 48079f7638..751cd74f2a 100644 Binary files a/tests/resources/functions/php.tar.gz and b/tests/resources/functions/php.tar.gz differ diff --git a/tests/resources/functions/python.tar.gz b/tests/resources/functions/python.tar.gz index 184fdab701..dbb07c3f53 100644 Binary files a/tests/resources/functions/python.tar.gz and b/tests/resources/functions/python.tar.gz differ