test: give positive-duration build fixtures measurable runtime

This commit is contained in:
loks0n committed 2026-09-14 12:28:04 +01:00
1 parent 6e53246929
commit 7c856a5889
3 files changed
+8 -1

No files matched your search

@@ -1945,7 +1945,10 @@ final class FunctionsCustomServerTest extends Scope
public function testGetDeployment(): void
{
$data = $this->setupTestDeployment();
// Keep the measured build longer than Kubernetes timestamp precision.
$functionId = $this->setupDeployedFunction('Measured build', overrides: ['commands' => 'sleep 2']);
$function = $this->getFunction($functionId);
$data = ['functionId' => $functionId, 'deploymentId' => $function['body']['deploymentId']];
/**
* Test for SUCCESS
@@ -1026,6 +1026,8 @@ final class RealtimeConsoleClientTest extends Scope
'name' => 'Test',
'runtime' => 'node-22',
'entrypoint' => 'index.js',
// This lifecycle assertion requires a positive measured duration.
'commands' => 'sleep 2',
'events' => [
'users.*.create',
'users.*.delete',
@@ -2263,6 +2263,8 @@ final class SitesCustomServerTest extends Scope
{
$siteId = $this->setupSite([
'buildRuntime' => 'node-22',
// Keep the measured build longer than Kubernetes timestamp precision.
'buildCommand' => 'sleep 2',
'fallbackFile' => '',
'framework' => 'other',
'name' => 'Test Site',