Skip to content

How to test SetupWithManager? #3071

Closed as not planned
Closed as not planned
@pbxqdown

Description

@pbxqdown

When trying to test default generated controller code, I found that test doesn't cover SetupWithManager function. I tried to create/update resource, but CreateFunc/UpdateFunc defined in Predicates of SetupWithManager is not called.
Is it because envtest package doesn't emit event when there is change? Wondering how should we test CreateFunc/UpdateFunc in this case.
not sure whether this question is more appropriate here or in the kubebuilder repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions