INFRA-3968 | Saqib | fixes checkstyle

This commit is contained in:
Saqib Perwaiz
2024-12-09 21:09:53 +05:30
parent 603eca693d
commit f540d64295
2 changed files with 2 additions and 2 deletions

View File

@@ -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);

View File

@@ -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";