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
[#6243] Ensure "node-to-node" tls is enabled in order to use "client-to-node" tls during create universe testcase #6910
base: master
Are you sure you want to change the base?
Conversation
Sorry, @jaydeepkumara, |
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.
Sorry, @jaydeepkumara,
In this case its ok since he actually added two new test cases.
If Daniel can add his fix on top of this if it is any different or adds some value.
|
||
ObjectNode bodyJson = Json.newObject(); | ||
ObjectNode userIntentJson = Json.newObject().put("universeName", "SingleUserUniverse") | ||
.put("instanceType", i.getInstanceTypeCode()).put("replicationFactor", 3).put("numNodes", 3) |
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.
Make sure line length does not exceed 100.
|
||
String url = "/api/customers/" + customer.uuid + "/universes"; | ||
Result result = doRequestWithAuthTokenAndBody("POST", url, authToken, bodyJson); | ||
String expectedResult = String.format("It is imperative that the NodeToNode TLS encryption should be enabled for enabling the ClientToNode TLS encryption."); |
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.
same.
JsonNode clusters = formData.get("clusters"); | ||
if (clusters == null) { | ||
return true; | ||
} | ||
for (JsonNode cluster : formData.get("clusters")) { | ||
JsonNode nodeToNodeEncryption = cluster.get("userIntent").get("enableNodeToNodeEncrypt"); |
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 can still result in a NPE if a cluster does not have a userIntent field. This method should not assume the data is in any specific shape since we don't have upstream validation of the shape of the JSON request payload before this method is called.
I just landed my diff fixing the NPE in UniverseController.java. If you want to change this diff to only include the extra unit tests that would still be useful though. |
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.
See my last comment. As @SergeyPotachev mentioned, we definitely should figure out a way to give you guys more visibility on the PRs that we have up internally somehow to avoid duplicate work in the future. I should have better communicated that I had a fix up for review already for this, my bad.
No description provided.