1
0
Fork 0
mirror of synced 2024-06-02 19:04:49 +12:00

Updated tests

This commit is contained in:
Eldad Fux 2021-01-19 14:55:02 +02:00
parent 7ebe5e7c5d
commit 6b2b50c77e
2 changed files with 31 additions and 30 deletions

View file

@ -27,23 +27,22 @@ before_install:
- docker --version
- docker buildx create --use
- chmod -R u+x ./.travis-ci
- ./.travis-ci/deploy.sh
# install:
# - docker-compose up -d
# - sleep 10
install:
- docker-compose up -d
- sleep 10
# script:
# - docker ps
# - docker-compose logs appwrite
# - docker-compose exec appwrite doctor
# - docker-compose exec appwrite vars
# - docker-compose exec appwrite test
script:
- docker ps
- docker-compose logs appwrite
- docker-compose exec appwrite doctor
- docker-compose exec appwrite vars
- docker-compose exec appwrite test
deploy:
- provider: script
edge: true
script: ./deploy.sh
script: ./.travis-ci/deploy.sh
on:
repo: appwrite/appwrite
branch: feat-new-ruby-version
branch: deploy

View file

@ -455,24 +455,6 @@ class FunctionsCustomServerTest extends Scope
public function testENVS():array
{
sleep(120);
/**
* Test for SUCCESS
*/
$file = $this->client->call(Client::METHOD_POST, '/storage/files', array_merge([
'content-type' => 'multipart/form-data',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()), [
'file' => new CURLFile(realpath(__DIR__ . '/../../../resources/logo.png'), 'image/png', 'logo.png'),
'read' => ['*'],
'write' => ['*'],
'folderId' => 'xyz',
]);
$this->assertEquals($file['headers']['status-code'], 201);
$this->assertNotEmpty($file['body']['$id']);
$fileId = $file['body']['$id'] ?? '';
$functions = realpath(__DIR__ . '/../../../resources/functions');
@ -539,6 +521,26 @@ class FunctionsCustomServerTest extends Scope
],
];
sleep(count($envs) * 25);
/**
* Test for SUCCESS
*/
$file = $this->client->call(Client::METHOD_POST, '/storage/files', array_merge([
'content-type' => 'multipart/form-data',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()), [
'file' => new CURLFile(realpath(__DIR__ . '/../../../resources/logo.png'), 'image/png', 'logo.png'),
'read' => ['*'],
'write' => ['*'],
'folderId' => 'xyz',
]);
$this->assertEquals($file['headers']['status-code'], 201);
$this->assertNotEmpty($file['body']['$id']);
$fileId = $file['body']['$id'] ?? '';
foreach ($envs as $key => $env) {
$language = $env['language'] ?? '';
$version = $env['version'] ?? '';