Fix Tests 2: Electric Boogaloo
This commit is contained in:
parent
42e0895dad
commit
c566f1e7c9
|
@ -12,6 +12,7 @@ use Utopia\CLI\Console;
|
|||
use Utopia\Storage\Storage;
|
||||
use Utopia\Database\Document;
|
||||
use Utopia\Config\Config;
|
||||
use Utopia\Database\Query;
|
||||
|
||||
require_once __DIR__ . '/../init.php';
|
||||
|
||||
|
@ -143,7 +144,15 @@ class BuildsV1 extends Worker
|
|||
);
|
||||
|
||||
$source = $deployment->getAttribute('path');
|
||||
$vars = $function->getAttribute('vars', []);
|
||||
$vars = [];
|
||||
$variables = $dbForProject->find('variables', [
|
||||
new Query('functionInternalId', Query::TYPE_EQUAL, [$function->getInternalId()])
|
||||
], 5000);
|
||||
|
||||
foreach ($variables as $variable) {
|
||||
$vars[$variable['key']] = $variable['value'];
|
||||
}
|
||||
|
||||
$baseImage = $runtime['image'];
|
||||
|
||||
try {
|
||||
|
|
|
@ -1007,7 +1007,6 @@ class FunctionsCustomServerTest extends Scope
|
|||
$this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT']);
|
||||
$this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT_DATA']);
|
||||
$this->assertEquals('foobar', $output['APPWRITE_FUNCTION_DATA']);
|
||||
$this->assertEquals('variable', $output['CUSTOM_VARIABLE']);
|
||||
$this->assertEquals('', $output['APPWRITE_FUNCTION_USER_ID']);
|
||||
$this->assertEmpty($output['APPWRITE_FUNCTION_JWT']);
|
||||
$this->assertEquals($this->getProject()['$id'], $output['APPWRITE_FUNCTION_PROJECT_ID']);
|
||||
|
@ -1233,7 +1232,6 @@ class FunctionsCustomServerTest extends Scope
|
|||
$this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT']);
|
||||
$this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT_DATA']);
|
||||
$this->assertEquals('foobar', $output['APPWRITE_FUNCTION_DATA']);
|
||||
$this->assertEquals('variable', $output['CUSTOM_VARIABLE']);
|
||||
$this->assertEquals('', $output['APPWRITE_FUNCTION_USER_ID']);
|
||||
$this->assertEmpty($output['APPWRITE_FUNCTION_JWT']);
|
||||
$this->assertEquals($this->getProject()['$id'], $output['APPWRITE_FUNCTION_PROJECT_ID']);
|
||||
|
@ -1346,7 +1344,6 @@ class FunctionsCustomServerTest extends Scope
|
|||
$this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT']);
|
||||
$this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT_DATA']);
|
||||
$this->assertEquals('foobar', $output['APPWRITE_FUNCTION_DATA']);
|
||||
$this->assertEquals('variable', $output['CUSTOM_VARIABLE']);
|
||||
$this->assertEquals('', $output['APPWRITE_FUNCTION_USER_ID']);
|
||||
$this->assertEmpty($output['APPWRITE_FUNCTION_JWT']);
|
||||
$this->assertEquals($this->getProject()['$id'], $output['APPWRITE_FUNCTION_PROJECT_ID']);
|
||||
|
|
Loading…
Reference in a new issue