Skip to content

Commit fd7f972

Browse files
committed
aws
1 parent 1190b17 commit fd7f972

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

aws-xray/src/awsTest/java/io/opentelemetry/contrib/aws/xray/AwsXrayRemoteSamplerIntegrationTest.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import java.time.Duration;
1717
import java.util.Collections;
1818
import org.junit.jupiter.api.Test;
19+
import org.junit.jupiter.api.condition.EnabledIf;
1920
import org.slf4j.Logger;
2021
import org.slf4j.LoggerFactory;
2122
import org.testcontainers.containers.GenericContainer;
@@ -31,9 +32,13 @@
3132
// to update sampling rules and assert rough ratios of sampling decisions. In the meantime, it
3233
// expects you to update the rules through the dashboard to see the effect on the sampling decisions
3334
// that are printed.
34-
@Testcontainers(disabledWithoutDocker = true)
35+
@EnabledIf("hasAwsCredentials")
3536
class AwsXrayRemoteSamplerIntegrationTest {
3637

38+
static boolean hasAwsCredentials() {
39+
return System.getenv("AWS_ACCESS_KEY_ID") != null;
40+
}
41+
3742
private static final Logger logger =
3843
LoggerFactory.getLogger(AwsXrayRemoteSamplerIntegrationTest.class);
3944

@@ -45,7 +50,7 @@ class AwsXrayRemoteSamplerIntegrationTest {
4550
.withLogConsumer(new Slf4jLogConsumer(LoggerFactory.getLogger("otel-collector")))
4651
.withCopyFileToContainer(
4752
MountableFile.forClasspathResource("/otel-collector.yml"), "/etc/otel-collector.yml")
48-
.withCommand("--config /etc/otel-collector.yml --log-level DEBUG")
53+
.withCommand("--config /etc/otel-collector.yml")
4954
.withEnv("AWS_ACCESS_KEY_ID", System.getenv("AWS_ACCESS_KEY_ID"))
5055
.withEnv("AWS_SECRET_ACCESS_KEY", System.getenv("AWS_SECRET_ACCESS_KEY"))
5156
.withEnv("AWS_REGION", System.getenv("AWS_REGION"));

0 commit comments

Comments
 (0)