Skip to content

Commit 8ec8e52

Browse files
committed
reformat code
1 parent 20e70e5 commit 8ec8e52

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
package io.javaoperatorsdk.operator.springboot.starter.test;
22

3-
43
import java.lang.annotation.Retention;
54
import java.lang.annotation.RetentionPolicy;
65
import org.springframework.context.annotation.Import;
76

87
@Retention(RetentionPolicy.RUNTIME)
98
@Import(TestConfiguration.class)
10-
public @interface EnableMockOperator {
11-
12-
}
9+
public @interface EnableMockOperator {}

operator-framework-spring-boot-starter-test/src/main/java/io/javaoperatorsdk/operator/springboot/starter/test/TestConfiguration.java

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@ public class TestConfiguration {
2525

2626
@Bean
2727
public KubernetesMockServer k8sMockServer() {
28-
final var server = new KubernetesMockServer(new Context(), new MockWebServer(), new HashMap<>(),
29-
new KubernetesCrudDispatcher(Collections.emptyList()), true);
28+
final var server =
29+
new KubernetesMockServer(
30+
new Context(),
31+
new MockWebServer(),
32+
new HashMap<>(),
33+
new KubernetesCrudDispatcher(Collections.emptyList()),
34+
true);
3035
server.init();
3136
return server;
3237
}
@@ -36,20 +41,20 @@ public KubernetesClient kubernetesClient(KubernetesMockServer server)
3641
throws FileNotFoundException {
3742
final var client = server.createClient();
3843

39-
crdPaths.forEach(crdPath -> {
40-
CustomResourceDefinition crd = null;
41-
try {
42-
crd = Serialization
43-
.unmarshal(new FileInputStream(ResourceUtils.getFile("classpath:test-crd.yaml")));
44-
} catch (FileNotFoundException e) {
45-
e.printStackTrace();
46-
return;
47-
}
48-
49-
client.apiextensions().v1beta1()
50-
.customResourceDefinitions()
51-
.create(crd);
52-
});
44+
crdPaths.forEach(
45+
crdPath -> {
46+
CustomResourceDefinition crd = null;
47+
try {
48+
crd =
49+
Serialization.unmarshal(
50+
new FileInputStream(ResourceUtils.getFile("classpath:test-crd.yaml")));
51+
} catch (FileNotFoundException e) {
52+
e.printStackTrace();
53+
return;
54+
}
55+
56+
client.apiextensions().v1beta1().customResourceDefinitions().create(crd);
57+
});
5358

5459
return client;
5560
}

samples/spring-boot-auto-config/src/test/java/io/javaoperatorsdk/operator/sample/SpringBootStarterSampleApplicationIT.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@
77
public class SpringBootStarterSampleApplicationIT {
88

99
@Test
10-
void contextLoads() {
11-
}
10+
void contextLoads() {}
1211
}

samples/spring-boot-auto-config/src/test/java/io/javaoperatorsdk/operator/sample/SpringBootStarterSampleApplicationTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@
99
public class SpringBootStarterSampleApplicationTest {
1010

1111
@Test
12-
void contextLoads() {
13-
}
12+
void contextLoads() {}
1413
}

0 commit comments

Comments
 (0)