-
Notifications
You must be signed in to change notification settings - Fork 214
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
Fix test fixtures, add a test for controllers #455
Conversation
738c901
to
ce60411
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me. There were a couple messages in the tests that were a little inaccurate and that's it.
pkg/kube/resources_test.go
Outdated
namespaceCount := map[string]int{} | ||
for _, controller := range resources.Controllers { | ||
namespaceCount[controller.ObjectMeta.GetNamespace()]++ | ||
} | ||
assert.Equal(t, 7, namespaceCount[""], "Should have seven controller in default namespace") | ||
assert.Equal(t, 8, namespaceCount[""], "Should have seven controller in default namespace") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should get rid of these messages, both of them are out of sync now.
"daemonset": false, | ||
} | ||
for _, ctrl := range resources.Controllers { | ||
expectedNames[ctrl.ObjectMeta.GetName()] = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this way of handling. I wonder if the assert library we use has something built in already or if we could contribute to it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's something like it, but it expects the same object type
Codecov Report
@@ Coverage Diff @@
## master #455 +/- ##
==========================================
+ Coverage 45.85% 48.14% +2.28%
==========================================
Files 12 12
Lines 700 700
==========================================
+ Hits 321 337 +16
+ Misses 325 302 -23
- Partials 54 61 +7
Continue to review full report at Codecov.
|
No description provided.