File tree Expand file tree Collapse file tree 6 files changed +73
-10
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 +73
-10
lines changed Original file line number Diff line number Diff line change 4343 <groupId >io.quarkus</groupId >
4444 <artifactId >quarkus-smallrye-health-deployment</artifactId >
4545 </dependency >
46+ <dependency >
47+ <groupId >io.quarkus</groupId >
48+ <artifactId >quarkus-junit5-internal</artifactId >
49+ <scope >test</scope >
50+ </dependency >
4651 </dependencies >
4752
4853 <build >
6065 </annotationProcessorPaths >
6166 </configuration >
6267 </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 >
6379 </plugins >
6480 </build >
6581
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 4747 <artifactId >maven-compiler-plugin</artifactId >
4848 <version >${compiler-plugin.version} </version >
4949 </plugin >
50+ <plugin >
51+ <artifactId >maven-surefire-plugin</artifactId >
52+ <version >${maven.surefire.version} </version >
53+ </plugin >
5054 </plugins >
5155 </pluginManagement >
5256 </build >
Original file line number Diff line number Diff line change 7777 </annotationProcessorPaths >
7878 </configuration >
7979 </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 >
9080 </plugins >
9181 </build >
9282</project >
You can’t perform that action at this time.
0 commit comments