Skip to content

Conversation

@adamwg
Copy link
Contributor

@adamwg adamwg commented Jan 13, 2026

Description of your changes

The internals of uptest respect context cancellation, but previously it wasn't possible to pass a context in when calling uptest as a library. This meant that callers couldn't cancel tests, for example when receiving a signal.

Rename RunTest to RunTestContext and add a context argument. Make RunTest a wrapper that uses context.Background() to avoid a breaking change for any existing users, but mark the context-free version as deprecated.

I have:

  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

  • Existing test suite.
  • Imported into the up CLI to verify that cancellation works.

The internals of uptest respect context cancellation, but previously it wasn't
possible to pass a context in when calling uptest as a library. This meant that
callers couldn't cancel tests, for example when receiving a signal.

Rename `RunTest` to `RunTestContext` and add a context argument. Make `RunTest`
a wrapper that uses `context.Background()` to avoid a breaking change for any
existing users, but mark the context-free version as deprecated.

Signed-off-by: Adam Wolfe Gordon <awg@upbound.io>
Copy link
Member

@sergenyalcin sergenyalcin left a comment

Choose a reason for hiding this comment

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

Thanks @adamwg LGTM!

@sergenyalcin sergenyalcin merged commit e2ea061 into crossplane:main Jan 14, 2026
6 of 7 checks passed
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