Skip to content

Commit

Permalink
Honor the environment variable for verifying the host at which the se…
Browse files Browse the repository at this point in the history
…rver is listening.
  • Loading branch information
roguexz committed Mar 29, 2020
1 parent 5f07a47 commit 21ff0dd
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;

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

import io.quarkus.it.rest.TestResource;
Expand All @@ -33,7 +34,8 @@ public void testInteger() {

@Test
public void testConfigInjectionOfPort() {
RestAssured.when().get("/test/config/host").then().body(is("0.0.0.0"));
String host = ConfigProvider.getConfig().getOptionalValue("quarkus.http.host", String.class).orElse("0.0.0.0");
RestAssured.when().get("/test/config/host").then().body(is(host));
}

@Test
Expand Down

0 comments on commit 21ff0dd

Please sign in to comment.