Skip to content

Commit 88764ab

Browse files
committed
test(upload): expect success when --ignore-sha-check bypasses dedup
The dcd swagger fix (getBinaryUploadUrl now returns a valid uploads/ staging path) makes the TUS fallback upload succeed against dev storage, so this test no longer fails — invert it to assert the command succeeds and returns a binary id.
1 parent 7e36017 commit 88764ab

1 file changed

Lines changed: 6 additions & 12 deletions

File tree

‎test/integration/upload.integration.test.ts‎

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -188,20 +188,14 @@ describe('Upload Command Integration Tests', () => {
188188
expect(stdout).to.include('skipping upload');
189189
});
190190

191-
it('should attempt a real upload when the SHA check is bypassed', async () => {
191+
it('should perform a real upload when the SHA check is bypassed', async () => {
192192
const command = `${CLI} upload ${androidAppFile} --api-key ${mockApiKey} --api-url ${mockApiUrl} --ignore-sha-check --json`;
193193

194-
// Bypassing dedup makes the CLI upload to the storage URLs from the
195-
// mock's example response, which point at real (unwritable) hosts —
196-
// so this deterministically fails after attempting every upload path.
197-
// It still verifies --ignore-sha-check skips the dedup short-circuit.
198-
const { code, stdout } = await runExpectingFailure(command, {
199-
timeout: 60_000,
200-
});
201-
expect(code).to.equal(1);
202-
const result = JSON.parse(stdout);
203-
expect(result).to.have.property('status', 'FAILED');
204-
expect(result.error).to.include('All uploads failed');
194+
// --ignore-sha-check skips the dedup short-circuit and performs a real
195+
// upload. The mock returns a valid `uploads/` staging path, so the TUS
196+
// fallback upload succeeds and the command returns the new binary id.
197+
const { stdout } = await exec(command, { timeout: 60_000 });
198+
expectUploadJson(stdout);
205199
});
206200
});
207201
});

0 commit comments

Comments
 (0)