File tree Expand file tree Collapse file tree 6 files changed +74
-11
lines changed
operator-framework-quarkus-extension
main/java/io/javaoperatorsdk/quarkus/extension/deployment
test/java/io/javaoperatorsdk/quarkus/extension/deployment Expand file tree Collapse file tree 6 files changed +74
-11
lines changed Original file line number Diff line number Diff line change 43
43
<groupId >io.quarkus</groupId >
44
44
<artifactId >quarkus-smallrye-health-deployment</artifactId >
45
45
</dependency >
46
+ <dependency >
47
+ <groupId >io.quarkus</groupId >
48
+ <artifactId >quarkus-junit5-internal</artifactId >
49
+ <scope >test</scope >
50
+ </dependency >
46
51
</dependencies >
47
52
48
53
<build >
60
65
</annotationProcessorPaths >
61
66
</configuration >
62
67
</plugin >
68
+ <plugin >
69
+ <groupId >org.apache.maven.plugins</groupId >
70
+ <artifactId >maven-surefire-plugin</artifactId >
71
+ <configuration >
72
+ <systemPropertyVariables >
73
+ <java .util.logging.manager>org.jboss.logmanager.LogManager
74
+ </java .util.logging.manager>
75
+ <maven .home>${maven.home} </maven .home>
76
+ </systemPropertyVariables >
77
+ </configuration >
78
+ </plugin >
63
79
</plugins >
64
80
</build >
65
81
Original file line number Diff line number Diff line change
1
+ package io .javaoperatorsdk .quarkus .extension .deployment ;
2
+
3
+ import io .fabric8 .kubernetes .client .CustomResource ;
4
+
5
+ public class TestResource extends CustomResource {}
Original file line number Diff line number Diff line change
1
+ package io .javaoperatorsdk .quarkus .extension .deployment ;
2
+
3
+ import static org .junit .jupiter .api .Assertions .assertNotNull ;
4
+
5
+ import io .javaoperatorsdk .operator .api .config .ConfigurationService ;
6
+ import io .quarkus .test .QuarkusUnitTest ;
7
+ import javax .inject .Inject ;
8
+ import org .jboss .shrinkwrap .api .ShrinkWrap ;
9
+ import org .jboss .shrinkwrap .api .spec .JavaArchive ;
10
+ import org .junit .jupiter .api .Test ;
11
+ import org .junit .jupiter .api .extension .RegisterExtension ;
12
+
13
+ public class QuarkusExtensionProcessorTest {
14
+
15
+ @ RegisterExtension
16
+ static final QuarkusUnitTest config =
17
+ new QuarkusUnitTest ().setArchiveProducer (() -> ShrinkWrap .create (JavaArchive .class ));
18
+
19
+ @ Inject TestController controller ;
20
+ @ Inject ConfigurationService configurationService ;
21
+
22
+ @ Test
23
+ void test () {
24
+ assertNotNull (controller );
25
+ assertNotNull (configurationService );
26
+ assertNotNull (configurationService .getConfigurationFor (controller ));
27
+ }
28
+ }
Original file line number Diff line number Diff line change
1
+ package io .javaoperatorsdk .quarkus .extension .deployment ;
2
+
3
+ import io .javaoperatorsdk .operator .api .Context ;
4
+ import io .javaoperatorsdk .operator .api .DeleteControl ;
5
+ import io .javaoperatorsdk .operator .api .ResourceController ;
6
+ import io .javaoperatorsdk .operator .api .UpdateControl ;
7
+
8
+ public class TestController implements ResourceController <TestResource > {
9
+
10
+ @ Override
11
+ public DeleteControl deleteResource (TestResource resource , Context <TestResource > context ) {
12
+ return null ;
13
+ }
14
+
15
+ @ Override
16
+ public UpdateControl <TestResource > createOrUpdateResource (
17
+ TestResource resource , Context <TestResource > context ) {
18
+ return null ;
19
+ }
20
+ }
Original file line number Diff line number Diff line change 19
19
<project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
20
20
<project .reporting.outputEncoding>UTF-8</project .reporting.outputEncoding>
21
21
<maven .compiler.parameters>true</maven .compiler.parameters>
22
- <quarkus .version>1.10.5.Final </quarkus .version>
22
+ <quarkus .version>1.11.0.Beta2 </quarkus .version>
23
23
<compiler-plugin .version>3.8.1</compiler-plugin .version>
24
24
<maven .surefire.version>3.0.0-M5</maven .surefire.version>
25
25
</properties >
47
47
<artifactId >maven-compiler-plugin</artifactId >
48
48
<version >${compiler-plugin.version} </version >
49
49
</plugin >
50
+ <plugin >
51
+ <artifactId >maven-surefire-plugin</artifactId >
52
+ <version >${maven.surefire.version} </version >
53
+ </plugin >
50
54
</plugins >
51
55
</pluginManagement >
52
56
</build >
Original file line number Diff line number Diff line change 77
77
</annotationProcessorPaths >
78
78
</configuration >
79
79
</plugin >
80
- <plugin >
81
- <artifactId >maven-surefire-plugin</artifactId >
82
- <version >${maven.surefire.version} </version >
83
- <configuration >
84
- <systemPropertyVariables >
85
- <java .util.logging.manager>org.jboss.logmanager.LogManager</java .util.logging.manager>
86
- <maven .home>${maven.home} </maven .home>
87
- </systemPropertyVariables >
88
- </configuration >
89
- </plugin >
90
80
</plugins >
91
81
</build >
92
82
</project >
You can’t perform that action at this time.
0 commit comments