-
Notifications
You must be signed in to change notification settings - Fork 18
Conversation
@@ -101,7 +101,11 @@ public static String getPrettyPrintJson(Map<String, String> attributes) { | |||
*/ | |||
public static String getIssuerName(String cellName) { | |||
|
|||
return cellName + "--sts-service"; | |||
if (cellName.equals("composite")) { |
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.
There is an already existing constant for this. Can we reuse this ?
@@ -156,7 +156,7 @@ public void testIsWorkloadExternalToCellery(String workload) throws Exception { | |||
@Test | |||
public void testGetIssuerName() throws Exception { | |||
|
|||
Assert.assertEquals(CellStsUtils.getIssuerName("hr"), "hr--sts-service"); | |||
Assert.assertEquals(CellStsUtils.getIssuerName("hr"), "hr--sts-service.default"); |
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.
Can we use the constants we defined ?
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.
Fixed
@@ -101,7 +101,11 @@ public static String getPrettyPrintJson(Map<String, String> attributes) { | |||
*/ | |||
public static String getIssuerName(String cellName) { | |||
|
|||
return cellName + "--sts-service"; | |||
if (cellName.equals(Constants.COMPOSITE_CELL_NAME)) { | |||
return cellName + Constants.STS_SERVICE + "." + Constants.SYSTEM_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.
Can we use StringBuilder for these concatenation ? It will be better.
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.
Done
Purpose