mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix: anonymous account tests
This commit is contained in:
@@ -14,7 +14,7 @@ use Utopia\Config\Config;
|
||||
|
||||
require_once __DIR__.'/../init.php';
|
||||
|
||||
// Runtime::enableCoroutine(SWOOLE_HOOK_ALL);
|
||||
Runtime::enableCoroutine(0);
|
||||
|
||||
Console::title('Functions V1 Worker');
|
||||
Console::success(APP_NAME.' functions worker v1 has started');
|
||||
@@ -26,7 +26,7 @@ $environments = Config::getParam('environments');
|
||||
*/
|
||||
$warmupStart = \microtime(true);
|
||||
|
||||
// Co\run(function() use ($environments) { // Warmup: make sure images are ready to run fast 🚀
|
||||
Co\run(function() use ($environments) { // Warmup: make sure images are ready to run fast 🚀
|
||||
|
||||
$dockerUser = App::getEnv('DOCKERHUB_PULL_USERNAME', null);
|
||||
$dockerPass = App::getEnv('DOCKERHUB_PULL_PASSWORD', null);
|
||||
@@ -40,7 +40,7 @@ $warmupStart = \microtime(true);
|
||||
}
|
||||
|
||||
foreach($environments as $environment) {
|
||||
// go(function() use ($environment) {
|
||||
go(function() use ($environment) {
|
||||
$stdout = '';
|
||||
$stderr = '';
|
||||
|
||||
@@ -55,9 +55,9 @@ $warmupStart = \microtime(true);
|
||||
if(!empty($stderr)) {
|
||||
Console::error($stderr);
|
||||
}
|
||||
// });
|
||||
});
|
||||
}
|
||||
// });
|
||||
});
|
||||
|
||||
$warmupEnd = \microtime(true);
|
||||
$warmupTime = $warmupEnd - $warmupStart;
|
||||
|
||||
@@ -261,7 +261,7 @@ class AccountCustomClientTest extends Scope
|
||||
/**
|
||||
* @depends testCreateAnonymousAccount
|
||||
*/
|
||||
public function testUpdateAnonymousAccountPassword($session):array
|
||||
public function testUpdateAnonymousAccountPassword($session)
|
||||
{
|
||||
/**
|
||||
* Test for FAILURE
|
||||
@@ -278,13 +278,13 @@ class AccountCustomClientTest extends Scope
|
||||
|
||||
$this->assertEquals($response['headers']['status-code'], 400);
|
||||
|
||||
return [];
|
||||
return $session;
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testUpdateAnonymousAccountPassword
|
||||
*/
|
||||
public function testUpdateAnonymousAccountEmail($session):array
|
||||
public function testUpdateAnonymousAccountEmail($session)
|
||||
{
|
||||
$email = uniqid().'new@localhost.test';
|
||||
|
||||
@@ -301,12 +301,12 @@ class AccountCustomClientTest extends Scope
|
||||
'password' => '',
|
||||
]);
|
||||
|
||||
$this->assertEquals(401, $response['headers']['status-code']);
|
||||
$this->assertEquals(400, $response['headers']['status-code']);
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
public function testConvertAnonymousAccount():array
|
||||
public function testConvertAnonymousAccount()
|
||||
{
|
||||
$session = $this->testCreateAnonymousAccount();
|
||||
$email = uniqid().'new@localhost.test';
|
||||
@@ -372,7 +372,7 @@ class AccountCustomClientTest extends Scope
|
||||
return [];
|
||||
}
|
||||
|
||||
public function testConvertAnonymousAccountOAuth2():array
|
||||
public function testConvertAnonymousAccountOAuth2()
|
||||
{
|
||||
$session = $this->testCreateAnonymousAccount();
|
||||
$provider = 'mock';
|
||||
|
||||
Reference in New Issue
Block a user