Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/core/test/scripts/sentry-xcode-scripts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,15 @@ describe('sentry-xcode-debug-files.sh', () => {
}
};

// These tests exercise the upload path only and never create a dSYM bundle. Without disabling
// the dSYM wait they would each hit the full wait_for_dsym_files() timeout (~10s), so set
// SENTRY_DSYM_WAIT_ENABLED=false to keep them fast. The dSYM wait behavior is covered by the
// dedicated 'dSYM wait functionality' block below.
it('exits with 0 when upload succeeds', () => {
const result = runScript({
MOCK_CLI_EXIT_CODE: '0',
MOCK_CLI_OUTPUT: 'Upload successful',
SENTRY_DSYM_WAIT_ENABLED: 'false',
});

expect(result.exitCode).toBe(0);
Expand All @@ -76,6 +81,7 @@ describe('sentry-xcode-debug-files.sh', () => {
MOCK_CLI_EXIT_CODE: '1',
MOCK_CLI_OUTPUT: 'Upload failed: API error',
SENTRY_ALLOW_FAILURE: 'true',
SENTRY_DSYM_WAIT_ENABLED: 'false',
});

expect(result.exitCode).toBe(0);
Expand All @@ -88,6 +94,7 @@ describe('sentry-xcode-debug-files.sh', () => {
const result = runScript({
MOCK_CLI_EXIT_CODE: '1',
MOCK_CLI_OUTPUT: 'Upload failed: API error',
SENTRY_DSYM_WAIT_ENABLED: 'false',
});

// Original behavior: script exits 0, but Xcode fails build due to "error:" prefix
Expand All @@ -102,6 +109,7 @@ describe('sentry-xcode-debug-files.sh', () => {
MOCK_CLI_EXIT_CODE: '1',
MOCK_CLI_OUTPUT: 'Upload failed: Network error',
SENTRY_ALLOW_FAILURE: 'false',
SENTRY_DSYM_WAIT_ENABLED: 'false',
});

// Original behavior: script exits 0, but Xcode fails build due to "error:" prefix
Expand Down
Loading