Skip to content

Commit

Permalink
Merge pull request #8240 from roguexz/master
Browse files Browse the repository at this point in the history
Honor the environment variable for verifying the host at which the server is listening
  • Loading branch information
gastaldi authored Mar 30, 2020
2 parents 1ecb466 + 21ff0dd commit 1562e07
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 1562e07

Please sign in to comment.