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

Refactor NewIndex() to ease testing #142

Merged
merged 1 commit into from
Jun 20, 2023

Conversation

ebauman
Copy link
Member

@ebauman ebauman commented Apr 13, 2023

Currently the NewIndex builder takes a sharedInformerFactory as an argument. This makes it difficult to test as you cannot easily fake and inject specific informers which you may need to attach handlers to, etc.

This PR adjusts the rbac index builder to take typed informer interfaces to ease unit testing.

Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
@ebauman
Copy link
Member Author

ebauman commented Apr 13, 2023

Oh, lovely, this also included some gofmt stuff.

@ebauman ebauman merged commit 651de40 into hobbyfarm:master Jun 20, 2023
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.

1 participant