Skip to content

Commit bdc4836

Browse files
committed
update code style
1 parent b33000f commit bdc4836

File tree

4 files changed

+34
-31
lines changed

4 files changed

+34
-31
lines changed

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@
1010
@PropertyMapping("io.javaoperatorsdk.test")
1111
public @interface EnableMockOperator {
1212

13-
/**
14-
* Define a list of files that contain CustomResourceDefinitions for the tested operator.
15-
* If the file to be loaded is shall be loaded from the classpath prefix it with 'classpath', otherwise provide a path relative to the work directory.
16-
* @return List of files
17-
*/
18-
@PropertyMapping("crd-paths")
19-
String[] crdPaths() default {};
13+
/**
14+
* Define a list of files that contain CustomResourceDefinitions for the tested operator. If the
15+
* file to be loaded is shall be loaded from the classpath prefix it with 'classpath', otherwise
16+
* provide a path relative to the work directory.
17+
*
18+
* @return List of files
19+
*/
20+
@PropertyMapping("crd-paths")
21+
String[] crdPaths() default {};
2022

2123
}

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ public KubernetesMockServer k8sMockServer() {
4141
}
4242

4343
@Bean
44-
public KubernetesClient kubernetesClient(KubernetesMockServer server, TestConfigurationProperties properties) {
44+
public KubernetesClient kubernetesClient(KubernetesMockServer server,
45+
TestConfigurationProperties properties) {
4546
final var client = server.createClient();
4647

47-
properties.getCrdPaths().forEach(
48+
properties.getCrdPaths().forEach(
4849
crdPath -> {
4950
CustomResourceDefinition crd;
5051
try {

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
@ConfigurationProperties("io.javaoperatorsdk.test")
88
public class TestConfigurationProperties {
99

10-
private List<String> crdPaths = new ArrayList<>();
10+
private List<String> crdPaths = new ArrayList<>();
1111

12-
public List<String> getCrdPaths() {
13-
return crdPaths;
14-
}
12+
public List<String> getCrdPaths() {
13+
return crdPaths;
14+
}
1515

16-
public void setCrdPaths(List<String> crdPaths) {
17-
this.crdPaths = crdPaths;
18-
}
16+
public void setCrdPaths(List<String> crdPaths) {
17+
this.crdPaths = crdPaths;
18+
}
1919
}

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,24 @@
1414
@EnableMockOperator(crdPaths = "classpath:crd.yml")
1515
class EnableMockOperatorTests {
1616

17-
@Autowired
18-
KubernetesClient client;
17+
@Autowired
18+
KubernetesClient client;
1919

20-
@Autowired
21-
ApplicationContext applicationContext;
20+
@Autowired
21+
ApplicationContext applicationContext;
2222

23-
@Test
24-
void testCrdLoaded() {
25-
assertThat(applicationContext.getBean(Operator.class))
26-
.isNotNull();
27-
assertThat(client.customResourceDefinitions()
28-
.withName("customservices.sample.javaoperatorsdk")
29-
.get()).isNotNull();
30-
}
23+
@Test
24+
void testCrdLoaded() {
25+
assertThat(applicationContext.getBean(Operator.class))
26+
.isNotNull();
27+
assertThat(client.customResourceDefinitions()
28+
.withName("customservices.sample.javaoperatorsdk")
29+
.get()).isNotNull();
30+
}
3131

32-
@SpringBootApplication
33-
static class SpringBootTestApplication {
32+
@SpringBootApplication
33+
static class SpringBootTestApplication {
3434

35-
}
35+
}
3636

3737
}

0 commit comments

Comments
 (0)