diff --git a/tests/e2e/Services/Functions/FunctionsCustomClientTest.php b/tests/e2e/Services/Functions/FunctionsCustomClientTest.php index fd6866f49f..b4c604c5cc 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomClientTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomClientTest.php @@ -33,7 +33,7 @@ class FunctionsCustomClientTest extends Scope 'account.create', 'account.delete', ], - 'schedule' => '0 0 1 1 *', + 'schedule' => '* * * * *', 'timeout' => 10, ]); @@ -64,7 +64,7 @@ class FunctionsCustomClientTest extends Scope 'account.create', 'account.delete', ], - 'schedule' => '0 0 1 1 *', + 'schedule' => '* * * * *', 'timeout' => 10, ]); diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index 9f994eebbd..9398b0fab0 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -35,7 +35,7 @@ class FunctionsCustomServerTest extends Scope 'account.create', 'account.delete', ], - 'schedule' => '0 0 1 1 *', + 'schedule' => '* * * * *', 'timeout' => 10, ]); @@ -57,7 +57,7 @@ class FunctionsCustomServerTest extends Scope 'account.create', 'account.delete', ], $response1['body']['events']); - $this->assertEquals('0 0 1 1 *', $response1['body']['schedule']); + $this->assertEquals('* * * * *', $response1['body']['schedule']); $this->assertEquals(10, $response1['body']['timeout']); /** @@ -142,7 +142,7 @@ class FunctionsCustomServerTest extends Scope 'account.update.name', 'account.update.email', ], - 'schedule' => '0 0 1 2 *', + 'schedule' => '* * * * 1', 'timeout' => 5, ]); @@ -161,7 +161,7 @@ class FunctionsCustomServerTest extends Scope 'account.update.name', 'account.update.email', ], $response1['body']['events']); - $this->assertEquals('0 0 1 2 *', $response1['body']['schedule']); + $this->assertEquals('* * * * 1', $response1['body']['schedule']); $this->assertEquals(5, $response1['body']['timeout']); /** @@ -549,7 +549,7 @@ class FunctionsCustomServerTest extends Scope $envs[$key] = array_merge($env, $functions[$key]); } - //sleep(count($envs) * 20); + sleep(count($envs) * 20); fwrite(STDERR, "."); /** @@ -823,19 +823,4 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals($executions['body']['executions'][0]['trigger'], 'http'); $this->assertStringContainsString('foobar', $executions['body']['executions'][0]['stdout']); } - - public function testCleanUp(): void - { - $functions = $this->client->call(Client::METHOD_GET, '/functions', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); - - foreach ($functions['body']['functions'] as $function) { - $this->client->call(Client::METHOD_DELETE, '/functions/'.$function['$id'], array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); - } - } } diff --git a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php index b08643e499..2ac18bac2d 100644 --- a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php +++ b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php @@ -461,6 +461,8 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($execution['headers']['status-code'], 201); $this->assertNotEmpty($execution['body']['$id']); + sleep(7); + $webhook = $this->getLastRequest(); $this->assertEquals($webhook['method'], 'POST');