Skip to content

test(integrations): Add permission, IDOR, and edge case tests for bulk code mappings#109786

Open
romtsn wants to merge 2 commits intorz/feat/bulk-code-mappings-endpointfrom
rz/feat/bulk-code-mappings-edge-cases
Open

test(integrations): Add permission, IDOR, and edge case tests for bulk code mappings#109786
romtsn wants to merge 2 commits intorz/feat/bulk-code-mappings-endpointfrom
rz/feat/bulk-code-mappings-edge-cases

Conversation

@romtsn
Copy link
Member

@romtsn romtsn commented Mar 3, 2026

Summary

  • Add tests for org:ci token authentication (sentry-cli CI use case)
  • Add IDOR prevention tests (cross-org project and repo access)
  • Add permission tests (project access check, org member access)
  • Add edge case tests (duplicate stackRoots in request, multiple repos with same name)

Depends on #109785
Closes getsentry/sentry-android-gradle-plugin#1075

Test plan

  • 7 additional tests (27 total), all passing
  • Pre-commit passes

Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@romtsn romtsn force-pushed the rz/feat/bulk-code-mappings-edge-cases branch from bba4e7d to fb4125f Compare March 3, 2026 23:14
@romtsn romtsn force-pushed the rz/feat/bulk-code-mappings-endpoint branch from 388490d to f859e09 Compare March 3, 2026 23:22
@romtsn romtsn requested review from a team as code owners March 3, 2026 23:22
@romtsn romtsn force-pushed the rz/feat/bulk-code-mappings-edge-cases branch from fb4125f to 7c50a5e Compare March 3, 2026 23:22
@romtsn romtsn force-pushed the rz/feat/bulk-code-mappings-edge-cases branch from 7c50a5e to 7a39daa Compare March 5, 2026 20:38
@romtsn romtsn force-pushed the rz/feat/bulk-code-mappings-edge-cases branch from 7a39daa to 63d0d0c Compare March 5, 2026 20:52
@romtsn romtsn force-pushed the rz/feat/bulk-code-mappings-edge-cases branch from 63d0d0c to 84754bc Compare March 5, 2026 20:59
@romtsn romtsn force-pushed the rz/feat/bulk-code-mappings-edge-cases branch from 84754bc to 7a5a034 Compare March 5, 2026 21:15
@romtsn romtsn force-pushed the rz/feat/bulk-code-mappings-edge-cases branch from 7a5a034 to 1627b8f Compare March 5, 2026 22:39
@romtsn romtsn force-pushed the rz/feat/bulk-code-mappings-endpoint branch from 8a88ceb to e78bac9 Compare March 6, 2026 12:20
@romtsn romtsn requested a review from a team as a code owner March 6, 2026 12:20
@romtsn romtsn force-pushed the rz/feat/bulk-code-mappings-edge-cases branch from 1627b8f to 2802318 Compare March 6, 2026 12:20
…k code mappings

Add tests for org:ci token auth, project access checks, cross-org IDOR
prevention, duplicate stackRoot handling, and multiple repos with the
same name.
The setUp login_as establishes a session that takes precedence over the
Bearer token, so the test was passing via session auth, not the org:ci
token. Adding logout ensures only token auth is exercised.
)
assert config._skip_post_save is False

# --- Permissions ---
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could remove these again, they typically don't get followed over time

Suggested change
# --- Permissions ---

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants