Updated tests
This commit is contained in:
parent
cef04229a3
commit
c841acd220
|
@ -185,7 +185,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'command' => 'php function.php',
|
||||
'code' => new CURLFile(realpath(__DIR__ . '/../../../resources/functions/php-fx.tar.gz'), 'application/x-gzip', 'php-fx.tar.gz'),
|
||||
'code' => new CURLFile(realpath(__DIR__ . '/../../../resources/functions/php.tar.gz'), 'application/x-gzip', 'php-fx.tar.gz'),
|
||||
]);
|
||||
|
||||
$tagId = $tag['body']['$id'] ?? '';
|
||||
|
@ -194,7 +194,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
$this->assertNotEmpty($tag['body']['$id']);
|
||||
$this->assertIsInt($tag['body']['dateCreated']);
|
||||
$this->assertEquals('php function.php', $tag['body']['command']);
|
||||
$this->assertEquals(751, $tag['body']['size']);
|
||||
$this->assertGreaterThan(10000, $tag['body']['size']);
|
||||
|
||||
/**
|
||||
* Test for FAILURE
|
||||
|
@ -266,7 +266,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
], $this->getHeaders()));
|
||||
|
||||
$this->assertEquals(200, $function['headers']['status-code']);
|
||||
$this->assertEquals(751, $function['body']['size']);
|
||||
$this->assertGreaterThan(10000, $function['body']['size']);
|
||||
|
||||
/**
|
||||
* Test for FAILURE
|
||||
|
|
|
@ -14,7 +14,7 @@ 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 install --ignore-platform-reqs
|
||||
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 .
|
||||
|
||||
|
|
0
tests/resources/functions/packages/php/.gitkeep
Normal file
0
tests/resources/functions/packages/php/.gitkeep
Normal file
0
tests/resources/functions/packages/python/.gitkeep
Normal file
0
tests/resources/functions/packages/python/.gitkeep
Normal file
Binary file not shown.
|
@ -9,11 +9,6 @@
|
|||
"email": "team@appwrite.io"
|
||||
}
|
||||
],
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Appwrite\\": "src/Appwrite"
|
||||
}
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.4.0",
|
||||
"ext-curl": "*",
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue