Skip to content

Conversation

@mmorel-35
Copy link
Contributor

  • Updated multiple test functions across various files to replace the use of context.Background() with t.Context() when calling the fixtures function.
  • This change ensures that the context used in tests is consistent and allows for better cancellation and timeout handling.
  • Affected files include:
    • controller/sync_test.go
    • server/settings/settings_test.go
    • test/e2e/project_management_test.go
    • util/grpc/grpc_test.go
    • util/settings/accounts_test.go
    • util/settings/settings_test.go

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Title of the PR
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).
- Updated multiple test functions across various files to replace the use of `context.Background()` with `t.Context()` when calling the `fixtures` function.
- This change ensures that the context used in tests is consistent and allows for better cancellation and timeout handling.
- Affected files include:
  - controller/sync_test.go
  - server/settings/settings_test.go
  - test/e2e/project_management_test.go
  - util/grpc/grpc_test.go
  - util/settings/accounts_test.go
  - util/settings/settings_test.go

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
@bunnyshell
Copy link

bunnyshell bot commented Nov 1, 2025

❗ Preview Environment deployment failed on Bunnyshell

See: Environment Details | Pipeline Logs

Available commands (reply to this comment):

  • 🚀 /bns:deploy to redeploy the environment
  • /bns:delete to remove the environment
@mmorel-35 mmorel-35 changed the title Refactor test functions to pass context from testing.T to fixtures Nov 1, 2025
@mmorel-35 mmorel-35 marked this pull request as ready for review November 1, 2025 13:57
@mmorel-35 mmorel-35 requested review from a team as code owners November 1, 2025 13:57
@codecov
Copy link

codecov bot commented Nov 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.25%. Comparing base (f26533a) to head (73def6b).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #25134      +/-   ##
==========================================
+ Coverage   62.24%   62.25%   +0.01%     
==========================================
  Files         351      351              
  Lines       49213    49213              
==========================================
+ Hits        30635    30640       +5     
+ Misses      15653    15644       -9     
- Partials     2925     2929       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@blakepettersson blakepettersson left a comment

Choose a reason for hiding this comment

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

LGTM

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

Labels

None yet

2 participants