From a6717b5feddfe3e39bed51d3a659064298952cde Mon Sep 17 00:00:00 2001 From: Mark Struberg Date: Thu, 4 Oct 2018 13:42:15 +0200 Subject: [PATCH] refs: #384 backport tck for ConfigAccessor and fix TCK setup This also includes a fix to avoid OS specific hacks (envconfig.* properties) --- tck/running_the_tck.asciidoc | 16 +- .../tck/CDIPropertyNameMatchingTest.java | 70 ++--- .../config/tck/ConfigAccessorTest.java | 261 ++++++++++++++++++ .../config/tck/SimpleValuesBean.java | 52 ---- .../ConfigurableConfigSource.java | 80 ++++++ .../META-INF/microprofile-config.properties | 19 +- 6 files changed, 397 insertions(+), 101 deletions(-) create mode 100644 tck/src/main/java/org/eclipse/microprofile/config/tck/ConfigAccessorTest.java delete mode 100644 tck/src/main/java/org/eclipse/microprofile/config/tck/SimpleValuesBean.java create mode 100644 tck/src/main/java/org/eclipse/microprofile/config/tck/configsources/ConfigurableConfigSource.java diff --git a/tck/running_the_tck.asciidoc b/tck/running_the_tck.asciidoc index d1b53838..1ae9b49c 100644 --- a/tck/running_the_tck.asciidoc +++ b/tck/running_the_tck.asciidoc @@ -54,10 +54,10 @@ To enable the tests in your project you need to add the following dependency to Some tests are asserting statements related to environment variables. The following environment variable and their values must be present in the test runner environment: -* `my_int_property` with the value `45` -* `MY_BOOLEAN_PROPERTY` with the value `true` -* `my_string_property` with the value `haha` -* `MY_STRING_PROPERTY` with the value `woohoo` +* `envconfig_my_int_property` with the value `45` +* `ENVCONFIG_MY_BOOLEAN_PROPERTY` with the value `true` +* `envconfig_my_string_property` with the value `haha` +* `ENVCONFIG_MY_STRING_PROPERTY` with the value `woohoo` See below for an example configuration to provide these environment variables in a Maven pom.xml. @@ -97,10 +97,10 @@ If you use Apache Maven then the tests are run via the `maven-surefire-plugin` - 45 - true - haha - woohoo + 45 + true + haha + woohoo diff --git a/tck/src/main/java/org/eclipse/microprofile/config/tck/CDIPropertyNameMatchingTest.java b/tck/src/main/java/org/eclipse/microprofile/config/tck/CDIPropertyNameMatchingTest.java index ebd90078..105c2b68 100644 --- a/tck/src/main/java/org/eclipse/microprofile/config/tck/CDIPropertyNameMatchingTest.java +++ b/tck/src/main/java/org/eclipse/microprofile/config/tck/CDIPropertyNameMatchingTest.java @@ -19,19 +19,21 @@ package org.eclipse.microprofile.config.tck; -import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; +import javax.enterprise.context.Dependent; import javax.inject.Inject; import javax.enterprise.inject.spi.CDI; -import org.eclipse.microprofile.config.Config; + +import org.eclipse.microprofile.config.inject.ConfigProperty; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.testng.Arquillian; import org.jboss.shrinkwrap.api.Archive; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.EmptyAsset; +import org.jboss.shrinkwrap.api.asset.StringAsset; import org.jboss.shrinkwrap.api.spec.JavaArchive; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Assert; @@ -51,13 +53,16 @@ */ public class CDIPropertyNameMatchingTest extends Arquillian { - private @Inject Config config; @Deployment public static Archive deployment() { JavaArchive testJar = ShrinkWrap .create(JavaArchive.class, "CDIPropertyNameMatchingTest.jar") .addClasses(CDIPropertyNameMatchingTest.class, SimpleValuesBean.class) + .addAsManifestResource(new StringAsset( + "envconfig.my.int/property=3"+ + "\nenvconfig.my.string/property=fake"), + "javaconfig.properties") .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml") .as(JavaArchive.class); @@ -71,30 +76,17 @@ public static Archive deployment() { public void checkSetup() { //check whether the environment variables were populated by the executor correctly - if (!"45".equals(System.getenv("my_int_property"))) { - Assert.fail("Before running this test, the environment variable \"my_int_property\" must be set with the value of 45"); + if (!"45".equals(System.getenv("envconfig_my_int_property"))) { + Assert.fail("Before running this test, the environment variable \"envconfig_my_int_property\" must be set with the value of 45"); } - if (!"true".equals(System.getenv("MY_BOOLEAN_PROPERTY"))) { - Assert.fail("Before running this test, the environment variable \"MY_BOOLEAN_Property\" must be set with the value of true"); + if (!"true".equals(System.getenv("ENVCONFIG_MY_BOOLEAN_PROPERTY"))) { + Assert.fail("Before running this test, the environment variable \"ENVCONFIG_MY_BOOLEAN_PROPERTY\" must be set with the value of true"); } - - // Environment variables are case insensitive on Windows platforms - if(System.getProperty("os.name").contains("Windows")) { - String myStringProp = System.getenv("MY_STRING_PROPERTY"); - if (!"woohoo".equals(myStringProp) && !"haha".equals(myStringProp)) { - Assert.fail("Before running this test on a Windows platform, " + - "the environment variable \"MY_STRING_PROPERTY\" must be set with the value of woohoo or haha"); - } + if (!"haha".equals(System.getenv("envconfig_my_string_property"))) { + Assert.fail("Before running this test, the environment variable \"envconfig_my_string_property\" must be set with the value of haha"); } - else { // Not operating on Windows platform - if (!"haha".equals(System.getenv("my_string_property"))) { - Assert.fail("Before running this test on a non-Windows platform, " + - "the environment variable \"my_string_property\" must be set with the value of haha"); - } - if (!"woohoo".equals(System.getenv("MY_STRING_PROPERTY"))) { - Assert.fail("Before running this test on a non-Windows platform, " + - "the environment variable \"MY_STRING_PROPERTY\" must be set with the value of woohoo"); - } + if (!"woohoo".equals(System.getenv("ENVCONFIG_MY_STRING_PROPERTY"))) { + Assert.fail("Before running this test, the environment variable \"ENVCONFIG_MY_STRING_PROPERTY\" must be set with the value of woohoo"); } } @@ -103,17 +95,9 @@ public void checkSetup() { public void testPropertyFromEnvironmentVariables() { SimpleValuesBean bean = getBeanOfType(SimpleValuesBean.class); - // Environment variables are case insensitive on Windows platforms, use Config to - // retrieve the "os.name" System property. - if(config.getValue("os.name", String.class).contains("Windows")) { - assertThat(bean.getStringProperty(), anyOf(equalTo("haha"),equalTo("woohoo")) ); - } - else { // non-Windows - assertThat(bean.getStringProperty(), is(equalTo("haha"))); - } - - assertThat(bean.getBooleanProperty(), is(true)); - assertThat(bean.getIntProperty(), is(equalTo(45))); + assertThat(bean.stringProperty, is(equalTo("haha"))); + assertThat(bean.booleanProperty, is(true)); + assertThat(bean.intProperty, is(equalTo(45))); } @@ -121,4 +105,20 @@ public void testPropertyFromEnvironmentVariables() { private T getBeanOfType(Class beanClass) { return CDI.current().select(beanClass).get(); } + + @Dependent + public static class SimpleValuesBean { + + @Inject + @ConfigProperty(name="envconfig.my.string/property") + private String stringProperty; + + @Inject + @ConfigProperty(name="envconfig.my.boolean/property") + private boolean booleanProperty; + + @Inject + @ConfigProperty(name="envconfig.my.int/property") + private int intProperty; + } } diff --git a/tck/src/main/java/org/eclipse/microprofile/config/tck/ConfigAccessorTest.java b/tck/src/main/java/org/eclipse/microprofile/config/tck/ConfigAccessorTest.java new file mode 100644 index 00000000..86b08cba --- /dev/null +++ b/tck/src/main/java/org/eclipse/microprofile/config/tck/ConfigAccessorTest.java @@ -0,0 +1,261 @@ +/* + * Copyright (c) 2016-2018 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.eclipse.microprofile.config.tck; + +import java.util.concurrent.TimeUnit; + +import javax.inject.Inject; + +import org.eclipse.microprofile.config.Config; +import org.eclipse.microprofile.config.ConfigAccessor; +import org.eclipse.microprofile.config.spi.ConfigSource; +import org.eclipse.microprofile.config.tck.base.AbstractTest; +import org.eclipse.microprofile.config.tck.configsources.ConfigurableConfigSource; +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.testng.Arquillian; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.asset.EmptyAsset; +import org.jboss.shrinkwrap.api.spec.JavaArchive; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.testng.Assert; +import org.testng.annotations.Test; + +/** + * @author Mark Struberg + */ +public class ConfigAccessorTest extends Arquillian { + + private @Inject Config config; + + @Deployment + public static WebArchive deploy() { + JavaArchive testJar = ShrinkWrap + .create(JavaArchive.class, "configValueTest.jar") + .addPackage(AbstractTest.class.getPackage()) + .addClass(ConfigAccessorTest.class) + .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml") + .addAsServiceProvider(ConfigSource.class, ConfigurableConfigSource.class) + .as(JavaArchive.class); + + AbstractTest.addFile(testJar, "META-INF/microprofile-config.properties"); + + WebArchive war = ShrinkWrap + .create(WebArchive.class, "configValueTest.war") + .addAsLibrary(testJar); + return war; + } + + + @Test + public void testGetValue() { + Assert.assertEquals(config.access("tck.config.test.javaconfig.configvalue.key1").getValue(), "value1"); + } + + @Test + public void testGetValueWithDefault() { + ConfigAccessor cfga = config.access("tck.config.test.javaconfig.configvalue.withdefault.notexisting") + .as(Integer.class) + .withDefault(Integer.valueOf(1234)); + + Assert.assertEquals(cfga.getValue(), Integer.valueOf(1234)); + } + + @Test + public void testGetValueWithStringDefault() { + ConfigAccessor cfga = config.access("tck.config.test.javaconfig.configvalue.withdefault.notexisting") + .as(Integer.class) + .withStringDefault("1234"); + + Assert.assertEquals(cfga.getValue(), Integer.valueOf(1234)); + } + + /** + * Checks whether variable substitution works. + * The following situation is configured in javaconfig.properties: + *
+     * tck.config.variable.baseHost = some.host.name
+     * tck.config.variable.firstEndpoint = http://${tck.config.variable.baseHost}/endpointOne
+     * tck.config.variable.secondEndpoint = http://${tck.config.variable.baseHost}/endpointTwo
+     * 
+ */ + @Test + public void testVariableReplacement() { + Assert.assertEquals(config.access("tck.config.variable.firstEndpoint").getValue(), + "http://some.host.name/endpointOne"); + + Assert.assertEquals(config.access("tck.config.variable.secondEndpoint").getValue(), + "http://some.host.name/endpointTwo"); + + // variables in Config.getValue and getOptionalValue do not get evaluated otoh + Assert.assertEquals(config.getValue("tck.config.variable.firstEndpoint", String.class), + "http://${tck.config.variable.baseHost}/endpointOne"); + + Assert.assertEquals(config.getOptionalValue("tck.config.variable.firstEndpoint", String.class).get(), + "http://${tck.config.variable.baseHost}/endpointOne"); + } + + @Test + public void testLookupChain() { + // set the projectstage to 'Production' + ConfigurableConfigSource.configure(config, "javaconfig.projectStage", "Production"); + + /** + * 1 1 -> com.foo.myapp.mycorp.Production + * 1 0 -> com.foo.myapp.mycorp + * 0 1 -> com.foo.myapp.Production + * 0 0 -> com.foo.myapp + * + */ + ConfigAccessor cv = config.access("com.foo.myapp") + .addLookupSuffix("mycorp") + .addLookupSuffix(config.access("javaconfig.projectStage")); + + Assert.assertFalse(cv.getOptionalValue().isPresent()); + + ConfigurableConfigSource.configure(config, "com.foo.myapp", "TheDefault"); + Assert.assertEquals(cv.getValue(), "TheDefault"); + Assert.assertEquals(cv.getResolvedPropertyName(), "com.foo.myapp"); + + ConfigurableConfigSource.configure(config, "com.foo.myapp.Production", "BasicWithProjectStage"); + Assert.assertEquals(cv.getValue(), "BasicWithProjectStage"); + Assert.assertEquals(cv.getResolvedPropertyName(), "com.foo.myapp.Production"); + + ConfigurableConfigSource.configure(config, "com.foo.myapp.mycorp", "WithTenant"); + Assert.assertEquals(cv.getValue(), "WithTenant"); + Assert.assertEquals(cv.getResolvedPropertyName(), "com.foo.myapp.mycorp"); + + ConfigurableConfigSource.configure(config, "com.foo.myapp.mycorp.Production", "WithTenantAndProjectStage"); + Assert.assertEquals(cv.getValue(), "WithTenantAndProjectStage"); + Assert.assertEquals(cv.getResolvedPropertyName(), "com.foo.myapp.mycorp.Production"); + } + + @Test + public void testIntegerConverter() { + Assert.assertEquals(config.access("tck.config.test.javaconfig.configvalue.integer").as(Integer.class).getValue(), + Integer.valueOf(1234)); + } + + @Test + public void testLongConverter() { + Assert.assertEquals(config.access("tck.config.test.javaconfig.configvalue.long").as(Long.class).getValue(), + Long.valueOf(1234567890123456L)); + } + + @Test + public void testFloatConverter() { + Assert.assertEquals(config.access("tck.config.test.javaconfig.configvalue.float").as(Float.class).getValue(), + Float.valueOf(12.34f)); + } + + @Test + public void testDoubleonverter() { + Assert.assertEquals(config.access("tck.config.test.javaconfig.configvalue.double").as(Double.class).getValue(), + Double.valueOf(12.34567890123456)); + } + + @Test + public void testBooleanConverter() { + Assert.assertEquals(config.access("tck.config.test.javaconfig.configvalue.boolean.true").as(Boolean.class).getValue(), + Boolean.TRUE); + + Assert.assertEquals(config.access("tck.config.test.javaconfig.configvalue.boolean.true_uppercase").as(Boolean.class).getValue(), + Boolean.TRUE); + + Assert.assertEquals(config.access("tck.config.test.javaconfig.configvalue.boolean.true_mixedcase").as(Boolean.class).getValue(), + Boolean.TRUE); + + Assert.assertEquals(config.access("tck.config.test.javaconfig.configvalue.boolean.false").as(Boolean.class).getValue(), + Boolean.FALSE); + + Assert.assertEquals(config.access("tck.config.test.javaconfig.configvalue.boolean.one").as(Boolean.class).getValue(), + Boolean.TRUE); + + Assert.assertEquals(config.access("tck.config.test.javaconfig.configvalue.boolean.zero").as(Boolean.class).getValue(), + Boolean.FALSE); + + Assert.assertEquals(config.access("tck.config.test.javaconfig.configvalue.boolean.seventeen").as(Boolean.class).getValue(), + Boolean.FALSE); + + Assert.assertEquals(config.access("tck.config.test.javaconfig.configvalue.boolean.yes").as(Boolean.class).getValue(), + Boolean.TRUE); + + Assert.assertEquals(config.access("tck.config.test.javaconfig.configvalue.boolean.yes_uppercase").as(Boolean.class).getValue(), + Boolean.TRUE); + + Assert.assertEquals(config.access("tck.config.test.javaconfig.configvalue.boolean.yes_mixedcase").as(Boolean.class).getValue(), + Boolean.TRUE); + + Assert.assertEquals(config.access("tck.config.test.javaconfig.configvalue.boolean.y").as(Boolean.class).getValue(), + Boolean.TRUE); + + Assert.assertEquals(config.access("tck.config.test.javaconfig.configvalue.boolean.y_uppercase").as(Boolean.class).getValue(), + Boolean.TRUE); + + Assert.assertEquals(config.access("tck.config.test.javaconfig.configvalue.boolean.no").as(Boolean.class).getValue(), + Boolean.FALSE); + + Assert.assertEquals(config.access("tck.config.test.javaconfig.configvalue.boolean.no_mixedcase").as(Boolean.class).getValue(), + Boolean.FALSE); + + } + + @Test + public void testCacheFor() throws Exception { + String key = "tck.config.test.javaconfig.cachefor.key"; + System.setProperty(key, "firstvalue"); + ConfigAccessor val = config.access(key).cacheFor(30, TimeUnit.MILLISECONDS); + Assert.assertEquals(val.getValue(), "firstvalue"); + + // immediately change the value + System.setProperty(key, "secondvalue"); + + // we should still see the first value, because it is cached! + Assert.assertEquals(val.getValue(), "firstvalue"); + + // but now let's wait a bit + Thread.sleep(60); + Assert.assertEquals(val.getValue(), "secondvalue"); + } + + @Test + public void testDefaultValue() { + String key = "tck.config.test.javaconfig.somerandom.default.key"; + + ConfigAccessor val = config.access(key); + Assert.assertNull(val.getDefaultValue()); + + ConfigAccessor val2 = config.access(key).withDefault("abc"); + Assert.assertEquals(val2.getDefaultValue(), "abc"); + Assert.assertEquals(val2.getValue(), "abc"); + + ConfigAccessor vali = config.access(key).as(Integer.class).withDefault(123); + Assert.assertEquals(vali.getDefaultValue(), Integer.valueOf(123)); + Assert.assertEquals(vali.getValue(), Integer.valueOf(123)); + + ConfigAccessor vali2 = config.access(key).as(Integer.class).withStringDefault("123"); + Assert.assertEquals(vali2.getDefaultValue(), Integer.valueOf(123)); + Assert.assertEquals(vali2.getValue(), Integer.valueOf(123)); + + System.setProperty(key, "666"); + Assert.assertEquals(vali2.getDefaultValue(), Integer.valueOf(123)); + Assert.assertEquals(vali2.getValue(), Integer.valueOf(666)); + + + } +} diff --git a/tck/src/main/java/org/eclipse/microprofile/config/tck/SimpleValuesBean.java b/tck/src/main/java/org/eclipse/microprofile/config/tck/SimpleValuesBean.java deleted file mode 100644 index fee2d09d..00000000 --- a/tck/src/main/java/org/eclipse/microprofile/config/tck/SimpleValuesBean.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation - * - * See the NOTICE file(s) distributed with this work for additional - * information regarding copyright ownership. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.eclipse.microprofile.config.tck; - -import org.eclipse.microprofile.config.inject.ConfigProperty; -import javax.enterprise.context.Dependent; -import javax.inject.Inject; - -@Dependent -public class SimpleValuesBean { - - @Inject - @ConfigProperty(name="my.string/property") - private String stringProperty; - - @Inject - @ConfigProperty(name="my.boolean.property") - private boolean booleanProperty; - - @Inject - @ConfigProperty(name="my.int/property") - private int intProperty; - - public String getStringProperty(){ - return this.stringProperty; - } - - public boolean getBooleanProperty(){ - return this.booleanProperty; - } - - public int getIntProperty(){ - return this.intProperty; - } -} diff --git a/tck/src/main/java/org/eclipse/microprofile/config/tck/configsources/ConfigurableConfigSource.java b/tck/src/main/java/org/eclipse/microprofile/config/tck/configsources/ConfigurableConfigSource.java new file mode 100644 index 00000000..519e7bbe --- /dev/null +++ b/tck/src/main/java/org/eclipse/microprofile/config/tck/configsources/ConfigurableConfigSource.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2016-2018 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package org.eclipse.microprofile.config.tck.configsources; + +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +import org.eclipse.microprofile.config.Config; +import org.eclipse.microprofile.config.spi.ConfigSource; + + +/** + * A ConfigSource which can be used to play through multiple + * different scenarios in our TCK. + * + * @author Mark Struberg + */ +public class ConfigurableConfigSource implements ConfigSource { + + private Consumer> reportAttributeChange; + + private Map properties = new HashMap<>(); + + @Override + public int getOrdinal() { + return 110; + } + + @Override + public Map getProperties() { + return properties; + } + + @Override + public String getValue(String propertyName) { + return properties.get(propertyName); + } + + @Override + public String getName() { + return this.getClass().getName(); + } + + @Override + public void setOnAttributeChange(Consumer> reportAttributeChange) { + this.reportAttributeChange = reportAttributeChange; + } + + public static void configure(Config cfg, String propertyName, String value) { + for (ConfigSource configSource : cfg.getConfigSources()) { + if (configSource instanceof ConfigurableConfigSource) { + ((ConfigurableConfigSource) configSource).properties.put(propertyName, value); + ((ConfigurableConfigSource) configSource).reportAttributeChange.accept(Collections.singleton(propertyName)); + return; + } + } + + throw new IllegalStateException("This Config doesn't contain a ConfigurableConfigSource!"); + } +} diff --git a/tck/src/main/resources/internal/META-INF/microprofile-config.properties b/tck/src/main/resources/internal/META-INF/microprofile-config.properties index f8185061..9365bc75 100644 --- a/tck/src/main/resources/internal/META-INF/microprofile-config.properties +++ b/tck/src/main/resources/internal/META-INF/microprofile-config.properties @@ -28,23 +28,19 @@ tck.config.test.overwritten.in.custompropertyfile.key1=value from microprofile-c tck.config.test.javaconfig.converter.integervalue = 1234 tck.config.test.javaconfig.converter.integervalue.broken = xxx - tck.config.test.javaconfig.converter.longvalue = 1234567890 tck.config.test.javaconfig.converter.longvalue.broken = xxx - tck.config.test.javaconfig.converter.floatvalue = 12.34 tck.config.test.javaconfig.converter.floatvalue.broken = alfasdf - tck.config.test.javaconfig.converter.doublevalue = 12.34 tck.config.test.javaconfig.converter.doublevalue.broken = alfasdf - +# the following are actually using implicit converters now: tck.config.test.javaconfig.converter.durationvalue = PT15M tck.config.test.javaconfig.converter.durationvalue.broken = alfasdf - tck.config.test.javaconfig.converter.localtimevalue = 10:37 tck.config.test.javaconfig.converter.localtimevalue.broken = alfasdf @@ -68,6 +64,7 @@ tck.config.test.javaconfig.converter.instantvalue.broken = alfasdf tck.config.test.javaconfig.configvalue.key1=value1 + # test BooleanConverter START tck.config.test.javaconfig.configvalue.boolean.true=true tck.config.test.javaconfig.configvalue.boolean.true_uppercase=TRUE @@ -82,6 +79,7 @@ tck.config.test.javaconfig.configvalue.boolean.yes=yes tck.config.test.javaconfig.configvalue.boolean.yes_uppercase=YES tck.config.test.javaconfig.configvalue.boolean.yes_mixedcase=Yes tck.config.test.javaconfig.configvalue.boolean.no=no +tck.config.test.javaconfig.configvalue.boolean.no_mixedcase=No tck.config.test.javaconfig.configvalue.boolean.y=y tck.config.test.javaconfig.configvalue.boolean.y_uppercase=Y @@ -115,10 +113,14 @@ tck.config.test.javaconfig.converter.urivalue=http://microprofile.io tck.config.test.javaconfig.converter.urivalue.broken=space is an illegal uri character # implicit Converter tests +tck.config.test.javaconfig.converter.implicit.enumvalue = FOO +tck.config.test.javaconfig.converter.implicit.enumvalue.broken = foobar +tck.config.test.javaconfig.converter.implicit.charSequenceCt=charSequenceCt +tck.config.test.javaconfig.converter.implicit.charSequenceParse=charSequenceParse +tck.config.test.javaconfig.converter.implicit.charSequenceValueOf=charSequenceValueOf tck.config.test.javaconfig.converter.implicit.stringCt=stringCt tck.config.test.javaconfig.converter.implicit.stringValueOf=stringValueOf tck.config.test.javaconfig.converter.implicit.stringOf=stringOf -tck.config.test.javaconfig.converter.implicit.charSequenceParse=charSequenceParse tck.config.test.javaconfig.converter.implicit.charSequenceParse.yearmonth=2017-12 tck.config.test.javaconfig.converter.implicit.enumValueOf=BAZ @@ -143,3 +145,8 @@ tck.config.test.javaconfig.converter.urlvalues=http://microprofile.io,http://ope tck.config.test.javaconfig.converter.class=org.eclipse.microprofile.config.tck.ClassConverterTest tck.config.test.javaconfig.converter.class.array=org.eclipse.microprofile.config.tck.ClassConverterTest,java.lang.String + +# variable replacement rests +tck.config.variable.baseHost = some.host.name +tck.config.variable.firstEndpoint = http://${tck.config.variable.baseHost}/endpointOne +tck.config.variable.secondEndpoint = http://${tck.config.variable.baseHost}/endpointTwo \ No newline at end of file