Skip to content

Commit 5d151ea

Browse files
committed
test: add dummy method to auth and use it in gax to test CI
1 parent 4f2e50a commit 5d151ea

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

google-auth-library-java/credentials/java/com/google/auth/Credentials.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,4 +194,9 @@ protected final void blockingGetToCallback(URI uri, RequestMetadataCallback call
194194
* @throws IOException if there was an error getting up-to-date access.
195195
*/
196196
public abstract void refresh() throws IOException;
197+
198+
/** Dummy method to test CI recognition of auth changes. */
199+
public String getTestString() {
200+
return "test";
201+
}
197202
}

sdk-platform-java/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/GrpcCallContext.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,9 @@ public <T> T getOption(Key<T> key) {
729729
@InternalApi
730730
public void validateUniverseDomain() {
731731
try {
732+
if (credentials != null) {
733+
credentials.getTestString();
734+
}
732735
endpointContext.validateUniverseDomain(credentials, UNAUTHENTICATED_STATUS_CODE);
733736
} catch (IOException e) {
734737
// Check if it is an Auth Exception (All instances of IOException from endpointContext's

0 commit comments

Comments
 (0)