Skip to content

Commit f2b6e9f

Browse files
committed
fix: explicit auth scope for CI runs
1 parent 4cc769c commit f2b6e9f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

java-compute/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/integration/ITComputeGoldenSignals.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ public void setUp() throws Exception {
112112
rootSpanName = "ComputeRootSpan-" + generateRandomHexString(8);
113113
testRunId = generateRandomHexString(8);
114114

115-
GoogleCredentials credentials = GoogleCredentials.getApplicationDefault();
115+
GoogleCredentials credentials =
116+
GoogleCredentials.getApplicationDefault()
117+
.createScoped(Arrays.asList("https://www.googleapis.com/auth/cloud-platform"));
116118
// We explicitly refresh the credentials here to guarantee a valid token is extracted.
117119
// The standard OTLP exporter does not automatically manage OAuth token lifecycles
118120
// when they are passed as static header strings.

0 commit comments

Comments
 (0)