From 0b1c000ca42e6a25d06279635d18e9ec7609ddeb Mon Sep 17 00:00:00 2001 From: Matt Collins Date: Tue, 30 Jul 2024 14:55:54 +1000 Subject: [PATCH] Only run integration examples if UID2_BASE_URL is defined --- src/test/java/com/uid2/client/test/IntegrationExamples.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/java/com/uid2/client/test/IntegrationExamples.java b/src/test/java/com/uid2/client/test/IntegrationExamples.java index dff0d36..8fb7c22 100644 --- a/src/test/java/com/uid2/client/test/IntegrationExamples.java +++ b/src/test/java/com/uid2/client/test/IntegrationExamples.java @@ -6,8 +6,11 @@ import java.util.TimerTask; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable; + import static org.junit.jupiter.api.Assertions.*; +@EnabledIfEnvironmentVariable(named = "UID2_BASE_URL", matches = "\\S+") public class IntegrationExamples { final String TEST_ENDPOINT = System.getenv("UID2_BASE_URL"); final String TEST_API_KEY = System.getenv("UID2_API_KEY");