Skip to content

chore: add unit tests for ListIntegrations and ListInvitations - #4856

Merged
shiroyasha merged 3 commits into
superplanehq:mainfrom
krishna28004:feat/add-organization-list-tests
Jul 4, 2026
Merged

chore: add unit tests for ListIntegrations and ListInvitations#4856
shiroyasha merged 3 commits into
superplanehq:mainfrom
krishna28004:feat/add-organization-list-tests

Conversation

@krishna28004

Copy link
Copy Markdown
Contributor

Description

This PR adds unit test coverage for the ListIntegrations and ListInvitations gRPC endpoints.

Coverage Included

  • organization isolation validation
  • deterministic assertions to avoid flaky shared-state assumptions
  • authenticated gRPC metadata context usage
  • empty-state and populated-response behavior validation

Notes

The tests were written following existing repository conventions (support.Setup(t), deterministic assertions, and organization boundary validation patterns).

I validated formatting and repository conventions locally. Full local execution currently requires generated protobuf artifacts (pkg/protos/*) and compose-based setup workflows that are not yet configured in my environment, so CI will perform the final execution pass.

@superplanehq-integration

Copy link
Copy Markdown

👋 Commands for maintainers:

  • /sp start - Start an ephemeral machine (takes ~30s)
  • /sp stop - Stop a running machine (auto-executed on pr close)

Signed-off-by: Krishna <krishnakumar2811004@gmail.com>
@krishna28004
krishna28004 force-pushed the feat/add-organization-list-tests branch from 81731ec to 3fb426f Compare May 18, 2026 09:32
@krishna28004

Copy link
Copy Markdown
Contributor Author

Friendly follow-up on this PR. Please let me know if there are any concerns or changes needed from my side. Thanks for taking a look.

@shiroyasha

Copy link
Copy Markdown
Collaborator

Hey @krishna28004, sorry for the late late response, we had quite a few open pull-requests.
I'll assign @lucaspin to assess if we need these unit tests for integration listing.

@shiroyasha shiroyasha changed the title test: add unit tests for ListIntegrations and ListInvitations chore: add unit tests for ListIntegrations and ListInvitations Jul 4, 2026
@superplane-gh-integration-9000

superplane-gh-integration-9000 Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Risk: 8/100 (very low)

Summary

Adds a new test file with four unit tests for the ListIntegrations action covering empty list, single, multiple, and cross-org isolation cases; no production code is changed.

Concerns

  • PR title claims 'ListInvitations' tests but none exist in the diff.
  • Subtests share database state; 'multiple integrations' count check uses GreaterOrEqual instead of an exact assertion.
  • 'multiple integrations' test depends on the integration created in the prior subtest running first.
  • No test for error path (e.g., invalid org ID or DB failure).

Recommended reviewers: lucaspin

@shiroyasha

Copy link
Copy Markdown
Collaborator

/sem-approve

Signed-off-by: Igor Šarčević <igor@operately.com>
@shiroyasha

Copy link
Copy Markdown
Collaborator

/sem-approve

@shiroyasha
shiroyasha merged commit 6a62f7e into superplanehq:main Jul 4, 2026
5 of 6 checks passed
@shiroyasha

Copy link
Copy Markdown
Collaborator

Congrats on your first merged pull-requests @krishna28004! Thanks for contributing to SuperPlane.

@krishna28004

Copy link
Copy Markdown
Contributor Author

Thank you! @shiroyasha, I appreciate the review and support. Looking forward to contributing more.

usernamenenad pushed a commit to usernamenenad/superplane that referenced this pull request Jul 5, 2026
…planehq#4856)

Signed-off-by: Krishna <krishnakumar2811004@gmail.com>
Signed-off-by: Igor Šarčević <igor@operately.com>
Co-authored-by: Igor Šarčević <igisar@gmail.com>
Co-authored-by: Igor Šarčević <igor@operately.com>
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