Skip to content

Commit 3d623c5

Browse files
chore: generate libraries at Fri Jan 23 19:05:17 UTC 2026
1 parent 8af127c commit 3d623c5

1 file changed

Lines changed: 48 additions & 44 deletions

File tree

  • java-showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it

java-showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITGdch.java

Lines changed: 48 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
///*
1+
/// *
22
// * Copyright 2023 Google LLC
33
// *
44
// * Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,47 +14,48 @@
1414
// * limitations under the License.
1515
// */
1616
//
17-
//package com.google.showcase.v1beta1.it;
18-
//
19-
//import static com.google.common.truth.Truth.assertThat;
20-
//import static com.google.common.truth.Truth.assertWithMessage;
21-
//import static org.junit.jupiter.api.Assertions.assertEquals;
22-
//import static org.junit.jupiter.api.Assertions.assertNotSame;
23-
//import static org.junit.jupiter.api.Assertions.assertThrows;
24-
//import static org.junit.jupiter.api.Assertions.assertTrue;
25-
//
26-
//import com.google.api.client.json.GenericJson;
27-
//import com.google.api.client.json.JsonFactory;
28-
//import com.google.api.client.json.gson.GsonFactory;
29-
//import com.google.api.gax.core.FixedCredentialsProvider;
30-
//import com.google.api.gax.rpc.ClientContext;
31-
//import com.google.auth.Credentials;
32-
//import com.google.auth.oauth2.GdchCredentials;
33-
//import com.google.auth.oauth2.GdchCredentialsTestUtil;
34-
//import com.google.showcase.v1beta1.EchoClient;
35-
//import com.google.showcase.v1beta1.EchoSettings;
36-
//import com.google.showcase.v1beta1.it.util.InterceptingMockTokenServerTransportFactory;
37-
//import com.google.showcase.v1beta1.it.util.TestClientInitializer;
38-
//import com.google.showcase.v1beta1.stub.EchoStubSettings;
39-
//import java.io.File;
40-
//import java.io.FileWriter;
41-
//import java.io.IOException;
42-
//import java.io.InputStream;
43-
//import java.net.URI;
44-
//import java.nio.file.Files;
45-
//import java.nio.file.Path;
46-
//import java.nio.file.StandardCopyOption;
47-
//import java.util.concurrent.TimeUnit;
48-
//import org.junit.jupiter.api.AfterEach;
49-
//import org.junit.jupiter.api.BeforeEach;
50-
//import org.junit.jupiter.api.Test;
51-
//import org.junit.jupiter.api.io.TempDir;
52-
//
53-
///**
54-
// * Test suite to confirm a client can be instantiated with GDCH credentials. No calls are made since
17+
// package com.google.showcase.v1beta1.it;
18+
//
19+
// import static com.google.common.truth.Truth.assertThat;
20+
// import static com.google.common.truth.Truth.assertWithMessage;
21+
// import static org.junit.jupiter.api.Assertions.assertEquals;
22+
// import static org.junit.jupiter.api.Assertions.assertNotSame;
23+
// import static org.junit.jupiter.api.Assertions.assertThrows;
24+
// import static org.junit.jupiter.api.Assertions.assertTrue;
25+
//
26+
// import com.google.api.client.json.GenericJson;
27+
// import com.google.api.client.json.JsonFactory;
28+
// import com.google.api.client.json.gson.GsonFactory;
29+
// import com.google.api.gax.core.FixedCredentialsProvider;
30+
// import com.google.api.gax.rpc.ClientContext;
31+
// import com.google.auth.Credentials;
32+
// import com.google.auth.oauth2.GdchCredentials;
33+
// import com.google.auth.oauth2.GdchCredentialsTestUtil;
34+
// import com.google.showcase.v1beta1.EchoClient;
35+
// import com.google.showcase.v1beta1.EchoSettings;
36+
// import com.google.showcase.v1beta1.it.util.InterceptingMockTokenServerTransportFactory;
37+
// import com.google.showcase.v1beta1.it.util.TestClientInitializer;
38+
// import com.google.showcase.v1beta1.stub.EchoStubSettings;
39+
// import java.io.File;
40+
// import java.io.FileWriter;
41+
// import java.io.IOException;
42+
// import java.io.InputStream;
43+
// import java.net.URI;
44+
// import java.nio.file.Files;
45+
// import java.nio.file.Path;
46+
// import java.nio.file.StandardCopyOption;
47+
// import java.util.concurrent.TimeUnit;
48+
// import org.junit.jupiter.api.AfterEach;
49+
// import org.junit.jupiter.api.BeforeEach;
50+
// import org.junit.jupiter.api.Test;
51+
// import org.junit.jupiter.api.io.TempDir;
52+
//
53+
/// **
54+
// * Test suite to confirm a client can be instantiated with GDCH credentials. No calls are made
55+
// since
5556
// * it is not feasible to test against real GDCH servers (or replicate an environment)
5657
// */
57-
//class ITGdch {
58+
// class ITGdch {
5859
//
5960
// private static final String CA_CERT_FILENAME = "fake_cert.pem";
6061
// private static final String CA_CERT_RESOURCE_PATH = "/" + CA_CERT_FILENAME;
@@ -123,7 +124,8 @@
123124
// }
124125
//
125126
// /**
126-
// * {@link com.google.api.gax.rpc.ClientContext} will create a new {@link GdchCredentials} with an
127+
// * {@link com.google.api.gax.rpc.ClientContext} will create a new {@link GdchCredentials} with
128+
// an
127129
// * audience defaulted to the endpoint if the audience is not manually passed. This test confirms
128130
// * that a new credential is created from the context and can be refreshed
129131
// *
@@ -183,7 +185,8 @@
183185
// // be created without issues
184186
// String testAudience = "valid-audience";
185187
// settings =
186-
// settings.toBuilder().setGdchApiAudience(testAudience).setEndpoint("localhost:7469").build();
188+
//
189+
// settings.toBuilder().setGdchApiAudience(testAudience).setEndpoint("localhost:7469").build();
187190
// context = ClientContext.create(settings);
188191
// stubSettings = EchoStubSettings.newBuilder(context).build();
189192
// client = EchoClient.create(stubSettings.createStub());
@@ -194,7 +197,8 @@
194197
// Credentials fromContext = context.getCredentials();
195198
// assertNotSame(fromContext, initialCredentials);
196199
//
197-
// // Again, since the initial credentials don't have an audience, we should not be able to refresh
200+
// // Again, since the initial credentials don't have an audience, we should not be able to
201+
// refresh
198202
// // them
199203
// NullPointerException thrownByClientCreds =
200204
// assertThrows(NullPointerException.class, () -> initialCredentials.refresh());
@@ -221,4 +225,4 @@
221225
// GDCH_TOKEN_STRING,
222226
// tokenUri);
223227
// }
224-
//}
228+
// }

0 commit comments

Comments
 (0)