Skip to content

operator: add golden style tests to the V1 operator#910

Closed
chrisseto wants to merge 2 commits intomainfrom
chris/p/v1-ctrl-golden-tests
Closed

operator: add golden style tests to the V1 operator#910
chrisseto wants to merge 2 commits intomainfrom
chris/p/v1-ctrl-golden-tests

Conversation

@chrisseto
Copy link
Contributor

This ended up being a bit nastier than I expected but it's mostly working. Just needs to have the actual golden files written out.

This commit improves the ergonomics of the kube.Ctl struct by allowing
configuration with variadic options and implementing Apply. These improvements
have been carried over to the kubetest.NewEnv function as well. Most notably,
this allows specifying the Scheme of the testenv which makes it useable when
testing CRDs.
}

select {
case <-time.After(10 * time.Second):
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: Should this be configurable?

Comment on lines +202 to +203
const logEvery = 10 * time.Second
const timeout = 5 * time.Minute
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: Should this be configurable?

@chrisseto chrisseto force-pushed the chris/p/v1-ctrl-golden-tests branch from 334115c to be13597 Compare June 12, 2025 18:48
@github-actions
Copy link

This PR is stale because it has been open 5 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the stale label Jun 18, 2025
@chrisseto
Copy link
Contributor Author

chrisseto commented Jun 19, 2025

Closing this as it's commits have been split between:

Thanks for looking Rafal!

@chrisseto chrisseto closed this Jun 19, 2025
@chrisseto chrisseto deleted the chris/p/v1-ctrl-golden-tests branch June 19, 2025 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants