From a17bfffa4226c876e2d46c2357fbc0304df84eb6 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Mon, 26 Apr 2021 12:29:12 +0200 Subject: [PATCH] tests: debug travis --- .travis.yml | 2 +- .../Functions/FunctionsCustomServerTest.php | 1 - .../Webhooks/WebhooksCustomServerTest.php | 16 ++++++++-------- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index a31a805f5f..3572a9b647 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ before_install: install: - docker-compose up -d -- sleep 10 +- sleep 90 script: - docker ps diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index 988377bc6b..eafb6949e6 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -7,7 +7,6 @@ use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\SideServer; -use Utopia\CLI\Console; class FunctionsCustomServerTest extends Scope { diff --git a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php index 8268007dfd..ae5bdfd055 100644 --- a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php +++ b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php @@ -475,7 +475,15 @@ class WebhooksCustomServerTest extends Scope sleep(6); $webhook = $this->getLastRequest(); + $function = $this->client->call(Client::METHOD_GET, '/functions/'.$data['functionId'].'/executions', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + var_dump($webhook); + var_dump('id: ',$execution['body']['$id']); + var_dump($function['body']); + $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); @@ -484,14 +492,6 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); - $function = $this->client->call(Client::METHOD_GET, '/functions/'.$data['functionId'].'/executions', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); - - var_dump('id: ',$execution['body']['$id']); - var_dump($function['body']); - /** * Test for FAILURE */