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

Add controllers tests for real Reconcile loop running with setup-envtest #146

Closed
dmvolod opened this issue Jan 17, 2024 · 0 comments · Fixed by #150
Closed

Add controllers tests for real Reconcile loop running with setup-envtest #146

dmvolod opened this issue Jan 17, 2024 · 0 comments · Fixed by #150
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@dmvolod
Copy link
Contributor

dmvolod commented Jan 17, 2024

User Story

As a developer I would like to run real controller reconcile loop for better testing, i.e. update or full lifecycle

Detailed Description

It would be nice to run controller test with SetupWithManager in addition to the single Reconcile(...) function just one time.
This is a big limitation, as setup-envetest fake Kubernetes cluster already bootstrapped in unit tests but not utilized in integration.
No CR updates can be tested with single Reconcile approach, as well as some features, introduced on the Kubernetes API server level, i.e. metadata Observed value, ObjectRefrence, Finalizers, etc. are not allowed.

Anything else you would like to add:

It would be nice to add real reconcile integration tests inside the controller package in addition to the single Reconcile unit tests and before real e2e tests introduced in #147.

/kind feature

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 17, 2024
@dmvolod dmvolod changed the title Migrate controllers tests to the real Reconcile loop running with setup-envtest Add controllers tests for real Reconcile loop running with setup-envtest Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
2 participants