Skip to content

Commit

Permalink
Merge pull request quarkusio#40749 from holly-cummins/enable-test-whi…
Browse files Browse the repository at this point in the history
…ch-now-works

Enable test which now works because of serialization changes
  • Loading branch information
gsmet authored May 22, 2024
2 parents 578e3bf + b24844c commit d9b98cd
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 199 deletions.
Original file line number Diff line number Diff line change
@@ -1,193 +0,0 @@
# Log settings
# log level in lower case for testing
quarkus.log.level=info
quarkus.log.file.enable=true
quarkus.log.file.level=INFO
quarkus.log.file.format=%d{HH:mm:ss} %-5p [%c{2.}]] (%t) %s%e%n

# Resource path to DSAPublicKey base64 encoded bytes
quarkus.root.dsa-key-location=/DSAPublicKey.encoded

# Have the TestProcessor validate the build time configuration below
quarkus.root.validate-build-config=true


### Configuration settings for the TestBuildTimeConfig config root
quarkus.bt.bt-string-opt=btStringOptValue
quarkus.bt.bt-sbv=StringBasedValue
# This is not set so that we should get the @ConfigItem defaultValue
#quarkus.bt.bt-sbv-with-default=StringBasedValue
quarkus.bt.all-values.oov=configPart1+configPart2
quarkus.bt.all-values.ovo=configPart1+configPart2
# This is not set so that we should get the @ConfigItem defaultValue
#quarkus.bt.bt-oov-with-default=ObjectOfValue
quarkus.bt.all-values.long-primitive=1234567891
quarkus.bt.all-values.double-primitive=3.1415926535897932384
quarkus.bt.all-values.long-value=1234567892
quarkus.bt.all-values.opt-long-value=1234567893
quarkus.bt.all-values.opt-double-value=3.1415926535897932384
quarkus.bt.all-values.optional-long-value=1234567894
quarkus.bt.all-values.nested-config-map.key1.nested-value=value1
quarkus.bt.all-values.nested-config-map.key1.oov=value1.1+value1.2
quarkus.bt.all-values.nested-config-map.key2.nested-value=value2
quarkus.bt.all-values.nested-config-map.key2.oov=value2.1+value2.2
quarkus.bt.all-values.string-list=value1,value2
quarkus.bt.all-values.long-list=1,2,3
quarkus.bt.bt-config-value=${test.record.expansion}
test.record.expansion=value
quarkus.bt.bt-config-value-empty=

### Duplicate settings for the TestBuildAndRunTimeConfig. May be able to drop if ConfigRoot inheritance is added
quarkus.btrt.bt-string-opt=btStringOptValue
quarkus.btrt.bt-sbv=StringBasedValue
quarkus.btrt.all-values.oov=configPart1+configPart2
quarkus.btrt.all-values.ovo=configPart1+configPart2
quarkus.btrt.all-values.long-primitive=1234567891
quarkus.btrt.all-values.double-primitive=3.1415926535897932384
quarkus.btrt.all-values.long-value=1234567892
quarkus.btrt.all-values.opt-long-value=1234567893
quarkus.btrt.all-values.opt-double-value=3.1415926535897932384
quarkus.btrt.all-values.optional-long-value=1234567894
quarkus.btrt.all-values.nested-config-map.key1.nested-value=value1
quarkus.btrt.all-values.nested-config-map.key1.oov=value1.1+value1.2
quarkus.btrt.all-values.nested-config-map.key2.nested-value=value2
quarkus.btrt.all-values.nested-config-map.key2.oov=value2.1+value2.2
quarkus.btrt.all-values.string-list=value1,value2
quarkus.btrt.all-values.long-list=1,2,3
# The expansion value is not available in runtime so we need to set it directly.
quarkus.btrt.all-values.expanded-default=1234

### Configuration settings for the TestRunTimeConfig config root
quarkus.rt.rt-string-opt=rtStringOptValue
quarkus.rt.rt-string-opt-with-default=rtStringOptWithDefaultValue
quarkus.rt.all-values.oov=configPart1+configPart2
quarkus.rt.all-values.ovo=configPart1+configPart2
quarkus.rt.all-values.long-primitive=12345678911
quarkus.rt.all-values.double-primitive=3.1415926535897932384
quarkus.rt.all-values.long-value=12345678921
quarkus.rt.all-values.opt-long-value=12345678931
quarkus.rt.all-values.opt-double-value=3.1415926535897932384
quarkus.rt.all-values.optional-long-value=12345678941
quarkus.rt.all-values.nested-config-map.key1.nested-value=value1
quarkus.rt.all-values.nested-config-map.key1.oov=value1.1+value1.2
quarkus.rt.all-values.nested-config-map.key2.nested-value=value2
quarkus.rt.all-values.nested-config-map.key2.oov=value2.1+value2.2
quarkus.rt.all-values.string-list=value1,value2
quarkus.rt.all-values.long-list=1,2,3
# A nested map of properties
quarkus.rt.all-values.string-map.key1=value1
quarkus.rt.all-values.string-map.key2=value2
quarkus.rt.all-values.string-map.key3=value3
# And list form
quarkus.rt.all-values.string-list-map.key1=value1,value2,value3
quarkus.rt.all-values.string-list-map.key2=value4,value5
quarkus.rt.all-values.string-list-map.key3=value6
# A root map of properties
quarkus.rt.string-map.key1=value1
quarkus.rt.string-map.key2=value2
quarkus.rt.string-map.key3=value3
# And list form
quarkus.rt.string-list-map.key1=value1
quarkus.rt.string-list-map.key2=value2,value3
quarkus.rt.string-list-map.key3=value4,value5,value6

### run time configuration using enhanced converters
quarkus.rt.my-enum=enum-two
quarkus.rt.my-enums=enum-one,enum-two
quarkus.rt.my-optional-enums=optional
quarkus.rt.no-hyphenate-first-enum=ENUM_ONE
quarkus.rt.no-hyphenate-second-enum=Enum_Two
quarkus.rt.primitive-boolean=YES
quarkus.rt.object-boolean=NO
quarkus.rt.primitive-integer=two
quarkus.rt.object-integer=nine
quarkus.rt.one-to-nine=one,two,three,four,five,six,seven,eight,nine
quarkus.rt.map-of-numbers.key1=one
quarkus.rt.map-of-numbers.key2=two

### map configurations
quarkus.rt.leaf-map.key.first=first-key-value
quarkus.rt.leaf-map.key.second=second-key-value
quarkus.rt.config-group-map.key.group.nested-value=value
quarkus.rt.config-group-map.key.group.oov=value2.1+value2.2

### build time and run time configuration using enhanced converters
quarkus.btrt.map-of-numbers.key1=one
quarkus.btrt.map-of-numbers.key2=two
quarkus.btrt.my-enum=optional
quarkus.btrt.my-enums=optional,enum-one,enum-two

### anonymous root property
quarkus.test-property=foo

### map of map of strings
quarkus.rt.map-map.outer-key.inner-key=1234
quarkus.btrt.map-map.outer-key.inner-key=1234
quarkus.bt.map-map.outer-key.inner-key=1234

# Test config root with "RuntimeConfig" suffix
quarkus.foo.bar=huhu

### named map with profiles
quarkus.btrt.map-map.main-profile.property=1234
%test.quarkus.btrt.map-map.test-profile.property=5678

### ordinal and default values source
config_ordinal=1000
my.prop=1234
%prod.my.prop=1234
%dev.my.prop=5678
%test.my.prop=1234

### Unknown properties
quarkus.unknown.prop=1234
quarkus.http.non-application-root-path=/1234
quarkus.http.ssl-port=4443
# This is how Env Source will output property names (for maps)
QUARKUS_HTTP_NON_APPLICATION_ROOT_PATH=/1234
quarkus.http.non.application.root.path=/1234
QUARKUS_HTTP_SSL_PORT=4443
quarkus.http.ssl.port=4443
quarkus.arc.unremovable-types=foo
# The YAML source may add an indexed property (depending on how the YAML is laid out). This is not supported by @ConfigRoot
quarkus.arc.unremovable-types[0]=foo

### Do not record env values in build time
bt.ok.to.record=properties
%test.bt.profile.record=properties

### mappings
quarkus.mapping.bt.value=value
quarkus.mapping.bt.group.value=value
quarkus.mapping.bt.present.value=present
quarkus.mapping.bt.groups[0].value=first
quarkus.mapping.bt.groups[1].value=second

quarkus.mapping.btrt.value=value
quarkus.mapping.btrt.group.value=value

quarkus.mapping.rt.value=value
quarkus.mapping.rt.group.value=value

### prefix
my.prefix.prop=1234
my.prefix.map.prop=1234
my.prefix.nested.nested-value=nested-1234
my.prefix.nested.oov=nested-1234+nested-5678
my.prefix.named.prop=1234
my.prefix.named.map.prop=1234
my.prefix.named.nested.nested-value=nested-1234
my.prefix.named.nested.oov=nested-1234+nested-5678

my.prefix.bt.prop=1234
my.prefix.bt.nested.nested-value=nested-1234
my.prefix.bt.nested.oov=nested-1234+nested-5678

another.another-prefix.prop=5678
another.another-prefix.map.prop=5678

proprietary.root.config.value=1234
proprietary.mapping.config.value=1234
proprietary.should.not.report.unknown=1234

unremoveable.value=1234
23 changes: 23 additions & 0 deletions integration-tests/test-extension/tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,29 @@
<quarkus.package.jar.type>uber-jar</quarkus.package.jar.type>
</properties>
</profile>
<profile>
<id>native-image</id>
<activation>
<property>
<name>native</name>
</property>
</activation>
<!-- add some custom config, the rest comes from parent -->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<!-- add a system property that can be used by JUnit to determine whether a native image can be built -->
<quarkus.test.native>true</quarkus.test.native>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import org.apache.maven.shared.invoker.MavenInvocationException;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;

Expand All @@ -21,7 +20,6 @@
* <p>
* mvn install -Dit.test=DevMojoIT#methodName
*/
@Disabled // because of https://github.com/quarkiverse/quarkus-pact/issues/73
@DisabledIfSystemProperty(named = "quarkus.test.native", matches = "true")
public class TestParameterDevModeIT extends RunAndCheckMojoTestBase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
* <p>
* mvn install -Dit.test=DevMojoIT#methodName
*/
@Disabled // because of https://github.com/quarkiverse/quarkus-pact/issues/73
@DisabledIfSystemProperty(named = "quarkus.test.native", matches = "true")
@Disabled("The base function now works via quarkus:test, but the test infrastructure for seeing how many tests ran needs the dev ui to be running")
public class TestParameterTestModeIT extends RunAndCheckMojoTestBase {

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
quarkus.test.continuous-testing=enabled
quarkus.test.continuous-testing=enabled
# this should not be needed, but something in the tests is setting this to 1234 and confusing the test framework, so set it here to match
quarkus.http.non-application-root-path=1234
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
quarkus.test.continuous-testing=enabled
quarkus.rest-client.alpaca-api.url=http://localhost:8085/
# this should not be needed, but something in the tests is setting this to 1234 and confusing the test framework, so set it here to match
quarkus.http.non-application-root-path=1234
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
quarkus.test.continuous-testing=enabled
quarkus.test.continuous-testing=enabled
# this should not be needed, but something in the tests is setting this to 1234 and confusing the test framework, so set it here to match
quarkus.http.non-application-root-path=1234

0 comments on commit d9b98cd

Please sign in to comment.