-
Notifications
You must be signed in to change notification settings - Fork 23
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
Use -n option for in-cluster rest config #1254
Conversation
🤖 Created branch: z_pr1254/tpantelis/in-cluster-ns |
d19d113
to
ebb8ef2
Compare
internal/restconfig/producer_test.go
Outdated
|
||
It("should return false", func() { | ||
wasRun, err := t.producer.RunOnSelectedPrefixedContext(prefix, func(_ *cluster.Info, _ string, _ reporter.Interface) error { | ||
return nil |
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.
return nil | |
t.actualProcessed++ | |
return nil |
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.
Was this supposed to be skipped?
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 assume you mean skipped wrt using noopPerContext
- no I missed thus one.
For some bizarre reason GitHub won’t let me request changes, just submit review comments. |
Signed-off-by: Tom Pantelis <[email protected]>
...to provide a hook for unit tests. Signed-off-by: Tom Pantelis <[email protected]>
...so the prefixed "namespace" flag is added. Signed-off-by: Tom Pantelis <[email protected]>
...that creates fake client sets for unit tests. Signed-off-by: Tom Pantelis <[email protected]>
ebb8ef2
to
8233d98
Compare
Also refactored the production code a little to increase branch coverage. Signed-off-by: Tom Pantelis <[email protected]>
Fixes submariner-io#324 Signed-off-by: Tom Pantelis <[email protected]>
8233d98
to
f3806ae
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.
Good one to learn from, thanks @tpantelis!
🤖 Closed branches: [z_pr1254/tpantelis/in-cluster-ns] |
This PR first adds unit tests for the
restconfig
module along with some minor supporting changes to the production code.Fixes #324