Skip to content

Commit 0d7ff28

Browse files
committed
test(native): add native test
This is currently not working very well because for some reason, the native test is run even when the native profile isn't activated when it shouldn't be, hence the current exclusion in the surefire configuration). More importantly, though, it's not activated either when the profile is activated so something is going on that I'm just not seeing right now. Committing for sync purposes.
1 parent db7ac34 commit 0d7ff28

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

operator-framework-quarkus-extension/tests/pom.xml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@
3333
<artifactId>quarkus-junit5-internal</artifactId>
3434
<scope>test</scope>
3535
</dependency>
36+
<dependency>
37+
<groupId>io.quarkus</groupId>
38+
<artifactId>quarkus-junit5</artifactId>
39+
<scope>test</scope>
40+
</dependency>
3641
<dependency>
3742
<groupId>io.rest-assured</groupId>
3843
<artifactId>rest-assured</artifactId>
@@ -70,6 +75,9 @@
7075
<groupId>org.apache.maven.plugins</groupId>
7176
<artifactId>maven-surefire-plugin</artifactId>
7277
<configuration>
78+
<excludes>
79+
<exclude>**/Native*.java</exclude>
80+
</excludes>
7381
<systemPropertyVariables>
7482
<java.util.logging.manager>
7583
org.jboss.logmanager.LogManager
@@ -80,4 +88,44 @@
8088
</plugin>
8189
</plugins>
8290
</build>
91+
92+
93+
<profiles>
94+
<profile>
95+
<id>native</id>
96+
<properties>
97+
<quarkus.package.type>native</quarkus.package.type>
98+
</properties>
99+
<build>
100+
<plugins>
101+
<plugin>
102+
<groupId>org.apache.maven.plugins</groupId>
103+
<artifactId>maven-failsafe-plugin</artifactId>
104+
<version>${maven.surefire.version}</version>
105+
<executions>
106+
<execution>
107+
<goals>
108+
<goal>integration-test</goal>
109+
<goal>verify</goal>
110+
</goals>
111+
<configuration>
112+
<systemPropertyVariables>
113+
<native.image.path>
114+
${project.build.directory}/${project.build.finalName}-runner
115+
</native.image.path>
116+
<java.util.logging.manager>
117+
org.jboss.logmanager.LogManager
118+
</java.util.logging.manager>
119+
<maven.home>${maven.home}</maven.home>
120+
</systemPropertyVariables>
121+
</configuration>
122+
</execution>
123+
</executions>
124+
</plugin>
125+
</plugins>
126+
</build>
127+
</profile>
128+
</profiles>
129+
130+
83131
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package io.javaoperatorsdk.quarkus.it;
2+
3+
import io.quarkus.test.junit.NativeImageTest;
4+
5+
@NativeImageTest
6+
public class NativeQuarkusExtensionProcessorIT extends QuarkusExtensionProcessorTest {}

0 commit comments

Comments
 (0)