Skip to content

Commit fb9f3f9

Browse files
test(build): Make hash stable with version increases (#3047)
### Description Fixes the `command_build_upload_ipa_chunked` integration test which was failing on macOS aarch64. The test was missing the `SENTRY_CLI_INTEGRATION_TEST_VERSION_OVERRIDE` environment variable, causing the uploaded file's checksum to change with different CLI versions. Adding this override ensures consistent test results by fixing the version embedded in the zip file's metadata. ### Issues <!-- * resolves: #1234 * resolves: LIN-1234 --> --- [Slack Thread](https://sentry.slack.com/archives/C09CKF6B7T6/p1765984281970479?thread_ts=1765984281.970479&cid=C09CKF6B7T6) <a href="https://cursor.com/background-agent?bcId=bc-24fb9dc8-c9cd-4fcb-9746-359155832a8e"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/open-in-cursor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/open-in-cursor-light.svg"><img alt="Open in Cursor" src="https://cursor.com/open-in-cursor.svg"></picture></a>&nbsp;<a href="https://cursor.com/agents?id=bc-24fb9dc8-c9cd-4fcb-9746-359155832a8e"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/open-in-web-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/open-in-web-light.svg"><img alt="Open in Web" src="https://cursor.com/open-in-web.svg"></picture></a> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
1 parent 81ece1c commit fb9f3f9

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/integration/build/upload.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ fn command_build_upload_ipa_chunked() {
224224
if is_first_assemble_call.swap(false, Ordering::Relaxed) {
225225
r#"{
226226
"state": "created",
227-
"missingChunks": ["1f168f404b360494fd1adbafaf920a303d1b3691"]
227+
"missingChunks": ["ecf0e7cb306f29b21189f49d0879bd85aa4be146"]
228228
}"#
229229
} else {
230230
r#"{
@@ -238,6 +238,9 @@ fn command_build_upload_ipa_chunked() {
238238
.expect(2),
239239
)
240240
.register_trycmd_test("build/build-upload-ipa.trycmd")
241+
// We override the version in the metadata field to ensure a consistent checksum
242+
// for the uploaded files.
243+
.env("SENTRY_CLI_INTEGRATION_TEST_VERSION_OVERRIDE", "0.0.0-test")
241244
.with_default_token();
242245
}
243246

0 commit comments

Comments
 (0)