Skip to content

Commit 28ab3c1

Browse files
committed
test(execution): align large-value fixtures with the declared-size cap
1 parent f21ccb9 commit 28ab3c1

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎apps/sim/lib/uploads/utils/user-file-base64.server.test.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,19 +270,20 @@ describe('hydrateUserFilesWithBase64', () => {
270270
type: 'text/plain',
271271
context: 'execution',
272272
}
273+
const storedValue = Buffer.from(JSON.stringify({ file }), 'utf8')
273274
const ref = {
274275
__simLargeValueRef: true,
275276
version: 1,
276277
id: 'lv_ABCDEFGHIJKL',
277278
kind: 'object',
278-
size: 256,
279+
size: storedValue.length,
279280
key: 'execution/workspace/workflow/source-execution/large-value-lv_ABCDEFGHIJKL.json',
280281
executionId: 'source-execution',
281282
}
282283

283284
mockDownloadFile.mockImplementation(async ({ key }) => {
284285
if (key.includes('large-value')) {
285-
return Buffer.from(JSON.stringify({ file }), 'utf8')
286+
return storedValue
286287
}
287288
return Buffer.from('hello', 'utf8')
288289
})

‎apps/sim/lib/workflows/executor/execution-core.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,7 @@ describe('executeWorkflowCore terminal finalization sequencing', () => {
10821082
expect(result.success).toBe(true)
10831083
expect(executorExecuteMock).toHaveBeenCalledOnce()
10841084
expect(downloadFileMock).toHaveBeenCalledWith(
1085-
expect.objectContaining({ key: manifest.chunks[0].ref.key, maxBytes: 64 * 1024 * 1024 })
1085+
expect.objectContaining({ key: manifest.chunks[0].ref.key, maxBytes: sourceBytes.length })
10861086
)
10871087
expect(uploadFileMock).toHaveBeenCalledWith(
10881088
expect.objectContaining({

0 commit comments

Comments
 (0)