test: isolate execution deployment identity from shared fixtures

This commit is contained in:
loks0n committed 2026-09-14 12:28:04 +01:00
1 parent 7c856a5889
commit 82adc02389
1 file changed
+19 -1
@@ -1972,7 +1972,25 @@ final class FunctionsCustomServerTest extends Scope
public function testCreateExecution(): void
{
$data = $this->setupTestDeployment();
// Other deployment tests can replace the cached function's active build.
// Own the function here so the execution identity has a stable target.
$functionId = $this->setupFunction([
'functionId' => ID::unique(),
'name' => 'Test1',
'runtime' => 'node-22',
'entrypoint' => 'index.js',
'timeout' => 15,
]);
$variable = $this->createVariable($functionId, [
'key' => 'GLOBAL_VARIABLE',
'value' => 'Global Variable Value',
]);
$this->assertEquals(201, $variable['headers']['status-code']);
$deploymentId = $this->setupDeployment($functionId, [
'code' => $this->packageFunction('basic'),
'activate' => true,
]);
$data = ['functionId' => $functionId, 'deploymentId' => $deploymentId];
/**
* Test for SUCCESS