Skip to content

Commit

Permalink
test(json-schema): add logging docker container logging to ApiIntegra…
Browse files Browse the repository at this point in the history
…tionWithDockerIntegrationTest
  • Loading branch information
timonback committed Nov 13, 2023
1 parent 50a8de0 commit d3be50a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
package io.github.stavshamir.springwolf.example.sns;

import lombok.extern.slf4j.Slf4j;
import org.json.JSONException;
import org.junit.jupiter.api.Test;
import org.springframework.web.client.RestTemplate;
Expand All @@ -24,6 +25,7 @@
* the setup uses a full docker-compose context with a real sns instance.
*/
@Testcontainers
@Slf4j
// @Ignore("Uncomment this line if you have issues running this test on your local machine.")
public class ApiIntegrationWithDockerIntegrationTest {

Expand All @@ -46,7 +48,8 @@ public class ApiIntegrationWithDockerIntegrationTest {
@Container
public DockerComposeContainer<?> environment = new DockerComposeContainer<>(new File("docker-compose.yml"))
.withExposedService(APP_NAME, APP_PORT)
.withEnv(ENV);
.withEnv(ENV)
.withLogConsumer(APP_NAME, l -> log.warn("APP: %s".formatted(l.getUtf8StringWithoutLineEnding())));

private String baseUrl() {
String host = environment.getServiceHost(APP_NAME, APP_PORT);
Expand Down

0 comments on commit d3be50a

Please sign in to comment.