1
0
Fork 0
mirror of synced 2024-06-09 06:14:43 +12:00

Updated tests

This commit is contained in:
Eldad Fux 2020-12-11 10:59:12 +02:00
parent cef04229a3
commit c841acd220
7 changed files with 4 additions and 9 deletions

View file

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

View file

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

Binary file not shown.

View file

@ -9,11 +9,6 @@
"email": "team@appwrite.io"
}
],
"autoload": {
"psr-4": {
"Appwrite\\": "src/Appwrite"
}
},
"require": {
"php": ">=7.4.0",
"ext-curl": "*",