From ca68fbe5265e4c726cf6b67ba1c99fdbf00a364f Mon Sep 17 00:00:00 2001 From: Mira Leung Date: Tue, 15 Dec 2020 19:25:50 -0800 Subject: [PATCH] [ggj][engx] fix: update IAMCredentialsTest name handling (#605) * fix: fix dep ordering in Bazel dedupe rules * chore: centralize all Gapic class name getters * fix: use gapic-remapped names in package-info.java * fix: revert unrelated changes * fix: handle back-compat casing for IAMCredentials API * fix: update IAMCredentialsTest name handling --- .../com/google/api/generator/gapic/composer/ClassNames.java | 4 +--- test/integration/BUILD.bazel | 3 ++- ...edentialsClientTest.java => IAMCredentialsClientTest.java} | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) rename test/integration/goldens/credentials/{IamCredentialsClientTest.java => IAMCredentialsClientTest.java} (99%) diff --git a/src/main/java/com/google/api/generator/gapic/composer/ClassNames.java b/src/main/java/com/google/api/generator/gapic/composer/ClassNames.java index a53ffbb047..9135d88b5b 100644 --- a/src/main/java/com/google/api/generator/gapic/composer/ClassNames.java +++ b/src/main/java/com/google/api/generator/gapic/composer/ClassNames.java @@ -64,9 +64,7 @@ protected static String getGrpcServiceStubClassName(Service service) { } protected static String getServiceClientTestClassName(Service service) { - return String.format( - SERVICE_CLIENT_TEST_CLASS_NAME_PATTERN, - monolithBackwardsCompatibleName(service.overriddenName())); + return String.format(SERVICE_CLIENT_TEST_CLASS_NAME_PATTERN, service.overriddenName()); } protected static String getMockServiceClassName(Service service) { diff --git a/test/integration/BUILD.bazel b/test/integration/BUILD.bazel index 7383a5ad11..f9cd2e84cc 100644 --- a/test/integration/BUILD.bazel +++ b/test/integration/BUILD.bazel @@ -200,7 +200,8 @@ java_gapic_library( java_gapic_test( name = "credentials_java_gapic_test_suite", test_classes = [ - "com.google.cloud.iam.credentials.v1.IamCredentialsClientTest", + # Match google3. + "com.google.cloud.iam.credentials.v1.IAMCredentialsClientTest", ], runtime_deps = [":credentials_java_gapic_test"], ) diff --git a/test/integration/goldens/credentials/IamCredentialsClientTest.java b/test/integration/goldens/credentials/IAMCredentialsClientTest.java similarity index 99% rename from test/integration/goldens/credentials/IamCredentialsClientTest.java rename to test/integration/goldens/credentials/IAMCredentialsClientTest.java index e34da02196..461c655db0 100644 --- a/test/integration/goldens/credentials/IamCredentialsClientTest.java +++ b/test/integration/goldens/credentials/IAMCredentialsClientTest.java @@ -42,7 +42,7 @@ import org.junit.Test; @Generated("by gapic-generator-java") -public class IamCredentialsClientTest { +public class IAMCredentialsClientTest { private static MockServiceHelper mockServiceHelper; private static MockIAMCredentials mockIAMCredentials; private IamCredentialsClient client;