INFRA-3968 | Saqib | fixes checkstyle
This commit is contained in:
@@ -46,7 +46,7 @@ public class DiagnosticServiceUtilities {
|
||||
var split = podName.split("-");
|
||||
int lastServiceIndex = podName.lastIndexOf("-service");
|
||||
if (lastServiceIndex != -1) {
|
||||
return podName.substring(0, lastServiceIndex+ "-service".length());
|
||||
return podName.substring(0, lastServiceIndex + "-service".length());
|
||||
}
|
||||
|
||||
var containerName = Arrays.copyOfRange(split, 0, split.length - 2);
|
||||
|
||||
@@ -37,7 +37,7 @@ class DiagnosticServiceUtilitiesTest {
|
||||
|
||||
@Test
|
||||
@DisplayName("Should extract main container name from pod when service is not present in pod name")
|
||||
void shouldExtractMainContainerNameFromPodNameWithoutService(){
|
||||
void shouldExtractMainContainerNameFromPodNameWithoutService() {
|
||||
final var podName = "spring-boot-demo-navi-5b88f8bfc6-z862b";
|
||||
final var actual = DiagnosticServiceUtilities.getContainerFromPod(podName);
|
||||
final var expected = "spring-boot-demo-navi";
|
||||
|
||||
Reference in New Issue
Block a user