diff --git a/microprofile/config/pom.xml b/microprofile/config/pom.xml index e5835152b49..760fa6445c4 100644 --- a/microprofile/config/pom.xml +++ b/microprofile/config/pom.xml @@ -39,6 +39,10 @@ io.helidon.config helidon-config-mp + + io.helidon.config + helidon-config-yaml-mp + io.helidon.config helidon-config-yaml diff --git a/tests/integration/config/gh-4375/pom.xml b/tests/integration/config/gh-4375/pom.xml new file mode 100644 index 00000000000..1da3b4e0bd1 --- /dev/null +++ b/tests/integration/config/gh-4375/pom.xml @@ -0,0 +1,46 @@ + + + + + 4.0.0 + + io.helidon.tests.integration + helidon-tests-integration-config + 3.0.0-SNAPSHOT + + + helidon-tests-integration-config-gh-4375 + Helidon Tests Integration GH 4375 + Validation for Github issue #4375 - Verify that helidon-config-yaml-mp is part of helidon-microprofile-config + + + + io.helidon.microprofile.config + helidon-microprofile-config + test + + + org.junit.jupiter + junit-jupiter-api + test + + + diff --git a/tests/integration/config/gh-4375/src/test/java/io/helidon/tests/integration/gh4375/YamlMpConfigTest.java b/tests/integration/config/gh-4375/src/test/java/io/helidon/tests/integration/gh4375/YamlMpConfigTest.java new file mode 100644 index 00000000000..2740c3898a1 --- /dev/null +++ b/tests/integration/config/gh-4375/src/test/java/io/helidon/tests/integration/gh4375/YamlMpConfigTest.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2022 Oracle and/or its affiliates. + * + * 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 io.helidon.tests.integration.gh4375; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import org.eclipse.microprofile.config.Config; +import org.eclipse.microprofile.config.ConfigProvider; + +class YamlMpConfigTest { + private Config config; + + @BeforeEach + void initialize() { + this.config = ConfigProvider.getConfig(); + Assertions.assertNotNull(this.config); + } + + @Test + void TestYamlMpConfigExistsInMicroprofileConfig() { + Assertions.assertTrue(this.config.getValue("yamlMpConfigExists", Boolean.class)); + } +} diff --git a/tests/integration/config/gh-4375/src/test/resources/application.yaml b/tests/integration/config/gh-4375/src/test/resources/application.yaml new file mode 100644 index 00000000000..edeed54ed5c --- /dev/null +++ b/tests/integration/config/gh-4375/src/test/resources/application.yaml @@ -0,0 +1,17 @@ +# +# Copyright (c) 2022 Oracle and/or its affiliates. +# +# 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. +# + +yamlMpConfigExists: true diff --git a/tests/integration/config/hocon-mp/pom.xml b/tests/integration/config/hocon-mp/pom.xml index 57d31170041..43c19318efa 100644 --- a/tests/integration/config/hocon-mp/pom.xml +++ b/tests/integration/config/hocon-mp/pom.xml @@ -47,15 +47,5 @@ junit-jupiter-api test - - org.hamcrest - hamcrest-core - test - - - io.helidon.microprofile.tests - helidon-microprofile-tests-junit5 - test - diff --git a/tests/integration/config/hocon-mp/src/test/java/io/helidon/config/hocon/mp/HoconJsonMpMetaConfigTest.java b/tests/integration/config/hocon-mp/src/test/java/io/helidon/config/hocon/mp/HoconJsonMpMetaConfigTest.java index 1c133901c4f..25ca15ab982 100644 --- a/tests/integration/config/hocon-mp/src/test/java/io/helidon/config/hocon/mp/HoconJsonMpMetaConfigTest.java +++ b/tests/integration/config/hocon-mp/src/test/java/io/helidon/config/hocon/mp/HoconJsonMpMetaConfigTest.java @@ -34,7 +34,7 @@ * * This will use SeContainerInitializer rather than @HelidonTest as the latter does not make meta-config work */ -public class HoconJsonMpMetaConfigTest { +class HoconJsonMpMetaConfigTest { private static ConfigBean bean; private static SeContainer container;