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

Gslb Controller Unit Tests #6

Merged
merged 7 commits into from
Dec 11, 2019
Merged

Gslb Controller Unit Tests #6

merged 7 commits into from
Dec 11, 2019

Conversation

ytsarev
Copy link
Member

@ytsarev ytsarev commented Dec 10, 2019

* First set of unit tests to support contoller development
* Based on https://github.com/operator-framework/operator-sdk/blob/master/doc/user/unit-testing.md
* Instead of constructing complex Gslb type with Go type
declaration(which is really painful) we
use https://github.com/ghodss/yaml/ to serialize inline Yaml manifest and make testing easier
* Inspired by kubernetes/client-go#193 (comment))
* All API calls are mocked with fake client
* Current coverage:
  * check if child Ingresses are created
  * check if Status properly reflect ManagedHosts
  * check if Status properly reflect non existing Service status
* Further on we might want to test additional permutations
* We inherit Errcheck failures with operators-sdk
* Fixes are in master operator-framework/operator-sdk@v0.12.0...master
* Latest release of v0.12.0 do not contain them yet
* Actually fix errcheck errors in our codebase without
waiting for upstream
* Enable errcheck back in the pipeline
@ytsarev ytsarev requested a review from chriskieser December 11, 2019 13:41
@ytsarev ytsarev merged commit 46cf05b into master Dec 11, 2019
@ytsarev ytsarev deleted the tests branch December 11, 2019 13:45
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.

2 participants