Skip to content

Commit

Permalink
#4 - fix etcd test
Browse files Browse the repository at this point in the history
  • Loading branch information
speter555 committed Feb 12, 2024
1 parent da49bef commit 84aa8df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
1 change: 1 addition & 0 deletions qs-services/qs-rest-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<properties>
<failsafeArgLine>--add-opens java.base/java.lang=ALL-UNNAMED</failsafeArgLine>
</properties>

<dependencies>

<!-- Project dependecies-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,20 @@
*/
package hu.icellmobilsoft.quarkus.sampler.rest.test;

import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.junit.QuarkusTest;
import jakarta.inject.Inject;

import org.eclipse.microprofile.config.inject.ConfigProperty;
import org.eclipse.microprofile.config.ConfigProvider;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.junit.QuarkusTest;

@QuarkusTest
@QuarkusTestResource(value = EtcdResourceProfile.class)
class EtcdTest {

@Inject
@ConfigProperty(name = "hello", defaultValue = "default")
String configValue;

@Test
void test() {
Assertions.assertNotNull(configValue);
String configValue = ConfigProvider.getConfig().getOptionalValue("hello", String.class).orElse("default");
Assertions.assertEquals("world", configValue);
}
}

0 comments on commit 84aa8df

Please sign in to comment.