-
Notifications
You must be signed in to change notification settings - Fork 23
test: replace context.TODO() in tests #1314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Tomas Turek <[email protected]>
Reviewer's GuideThis PR refactors the test suite to use proper test-scoped contexts and Gomega instances, ensuring consistent context propagation across all tests and updating verify helper signatures and Ginkgo specs accordingly. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes - here's some feedback:
- Consider calling t.Parallel() at the top of your individual TestXxx functions to allow tests to run concurrently and speed up the suite.
- There’s a lot of repeated boilerplate initializing
g := NewWithT(t)andctx := t.Context(); you could extract that into a small helper or test setup function to reduce duplication.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider calling t.Parallel() at the top of your individual TestXxx functions to allow tests to run concurrently and speed up the suite.
- There’s a lot of repeated boilerplate initializing `g := NewWithT(t)` and `ctx := t.Context()`; you could extract that into a small helper or test setup function to reduce duplication.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
PR Type
Tests
Description
Replace context.TODO() with t.Context() in test files
Update test function signatures to use SpecContext
Add EnforceDefaultTimeoutsWhenUsingContexts() to test suites
Modernize Gomega usage patterns in tests
Diagram Walkthrough
File Walkthrough
48 files
Replace context.TODO() with t.Context() in sharding config testsReplace context.TODO() with t.Context() in database secret testsModernize context usage and Gomega patterns in deployment testsReplace context.TODO() with t.Context() in certificate generationtestsReplace context.TODO() with t.Context() in server config testsReplace context.TODO() with t.Context() in key resolution testsReplace context.TODO() with t.Context() in signer generation testsModernize context usage and Gomega patterns in role binding testsModernize context usage and Gomega patterns in role testsUpdate test function signatures to use SpecContextModernize context usage and Gomega patterns in ingress testsReplace context.TODO() with t.Context() in CTlog server config testsUpdate test function signatures to use SpecContextUpdate test function signatures to use SpecContextUpdate test function signatures to use SpecContextModernize context usage and Gomega patterns in config map testsModernize context usage and Gomega patterns in secret testsUpdate test function signatures to use SpecContextUpdate test function signatures to use SpecContextUpdate test function signatures to use SpecContextUpdate test function signatures to use SpecContextUpdate test function signatures to use SpecContextUpdate test function signatures to use SpecContextModernize context usage and Gomega patterns in service testsReplace context.TODO() with t.Context() in TSA test utilitiesModernize context usage and Gomega patterns in TLS testsReplace context.TODO() with t.Context() in public key resolution testsReplace context.TODO() with t.Context() in log signer TLS testsReplace context.TODO() with t.Context() in log server TLS testsReplace context.TODO() with t.Context() in CTlog key handling testsReplace context.TODO() with t.Context() in Fulcio root handling testsReplace context.TODO() with t.Context() in Fulcio ingress testsReplace context.TODO() with t.Context() in Rekor server ingress testsReplace context.TODO() with t.Context() in TSA ingress testsReplace context.TODO() with t.Context() in TUF ingress testsReplace context.TODO() with t.Context() in Rekor UI ingress testsReplace context.TODO() with context.Background() in test suiteReplace context.TODO() with t.Context() in TSA signer generation testsReplace context.TODO() with ctx in Rekor attestation testsReplace context.TODO() with t.Context() in RBAC action testsReplace context.TODO() with t.Context() in tree action testsReplace context.TODO() with t.Context() in NTP monitoring testsAdd EnforceDefaultTimeoutsWhenUsingContexts to CTlog test suiteAdd EnforceDefaultTimeoutsWhenUsingContexts to Fulcio test suiteAdd EnforceDefaultTimeoutsWhenUsingContexts to Rekor test suiteAdd EnforceDefaultTimeoutsWhenUsingContexts to Trillian test suiteAdd EnforceDefaultTimeoutsWhenUsingContexts to TSA test suiteAdd EnforceDefaultTimeoutsWhenUsingContexts to TUF test suite