From 771744fa2fb0becf4180aa07d62dd7a4b42d7e27 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Wed, 2 Sep 2026 13:49:49 +0100 Subject: [PATCH] test: compare the build download to buildSize instead of assuming a gzip artifact --- tests/e2e/Services/Functions/FunctionsCustomServerTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index 5102b241c6..742997eda8 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -1074,10 +1074,11 @@ final class FunctionsCustomServerTest extends Scope $this->assertEquals(200, $execution['body']['responseStatusCode']); $this->assertSame($deploymentId, \json_decode($execution['body']['responseBody'], true)['APPWRITE_FUNCTION_DEPLOYMENT']); - // The download endpoint reads buildPath through the builds device. + // The download endpoint reads buildPath through the builds device. The + // artifact format depends on the storage strategy, so compare sizes. $output = $this->getDeploymentDownload($functionId, $deploymentId, 'output'); $this->assertEquals(200, $output['headers']['status-code']); - $this->assertStringStartsWith("\x1f\x8b", $output['body']); + $this->assertSame($deployment['body']['buildSize'], \strlen($output['body'])); $source = $this->getDeploymentDownload($functionId, $deploymentId, 'source'); $this->assertEquals(200, $source['headers']['status-code']);