-
Notifications
You must be signed in to change notification settings - Fork 114
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
Adding project filters for NodeExport #382
Conversation
827599c
to
d3f54b4
Compare
Signed-off-by: Lance Finfrock <[email protected]>
d3f54b4
to
1935d55
Compare
actualNodeNames = append(actualNodeNames, nodeName) | ||
} | ||
} | ||
}) |
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'm not sure I understand this part. Do we not have a type for the response returned here?
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.
We do not have an exposed type. The type is here https://github.com/chef/automate/blob/master/components/config-mgmt-service/grpcserver/node_export.go#L31.
I found it easier to just parse the JSON.
|
||
actualNodeNames := make([]string, 0) | ||
jsonparser.ArrayEach(data, func(node []byte, _ jsonparser.ValueType, _ int, err error) { | ||
if err == 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.
I know this test is not trying to verify basic correctness of the endpoint, but it feels bad to ignore errors here...
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.
That sounds right. I will update this test to fail on a returned error.
Signed-off-by: Lance Finfrock <[email protected]>
🔩 Description
Adding project filtering for the cfgmgmt.proto NodeExport RPCs.
⛓️ Related Resources
#68
✅ Checklist