Skip to content
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

Support functional options in TestMain #750

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

kegsay
Copy link
Member

@kegsay kegsay commented Dec 17, 2024

Rather than having TestMainWithCleanup and TestMain, use functional options. Add support for a custom deployment mechanism at the same time.

This is a breaking change for users who use TestMainWithCleanup(m, namespace, cleanupFn) who now need to do TestMain(m, namespace, complement.WithCleanup(cleanupFn)).

Rather than having `TestMainWithCleanup` and `TestMain`, use functional
options. Add support for a custom deployment mechanism at the same time.
@kegsay kegsay requested review from a team as code owners December 17, 2024 09:10
Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

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

The code changes look good to me, though I'd like to see an implementation first (public or private) before merging.

test_main.go Outdated Show resolved Hide resolved
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.

3 participants