diff --git a/.circleci/config.yml b/.circleci/config.yml index 04ada2f08e..1545665da8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -35,6 +35,14 @@ jobs: cd /tmp/gapic-generator-java bazel --batch test //src/test/... --noshow_progress find . -type f -regex ".*/bazel-testlogs/.*xml" -exec cp {} ${TEST_REPORTS_DIR} \; + - run: + name: Run integration tests for gapic-generator-java + command: | + cd /tmp/gapic-generator-java + # Check only the goldens, rely on the pre-commits for client library compilation tests. + # Otherwise, this would take too long. + bazel --batch test //test/integration:asset //test/integration:logging //test/integration:redis --noshow_progress + find . -type f -regex ".*/bazel-testlogs/.*xml" -exec cp {} ${TEST_REPORTS_DIR} \; - store_test_results: path: ~/.cache/bazel google-java-format: diff --git a/test/integration/BUILD.bazel b/test/integration/BUILD.bazel index c1275aab13..c159d127e2 100644 --- a/test/integration/BUILD.bazel +++ b/test/integration/BUILD.bazel @@ -52,6 +52,7 @@ java_gapic_library( "@com_google_googleapis//google/iam/v1:iam_java_grpc", ], deps = [ + "@com_google_googleapis//google/cloud/asset/v1:asset_java_proto", "@com_google_googleapis//google/iam/v1:iam_java_proto", "@com_google_googleapis//google/identity/accesscontextmanager/v1:accesscontextmanager_proto", ], diff --git a/test/integration/goldens/asset/AssetServiceClient.java b/test/integration/goldens/asset/AssetServiceClient.java index 5035f43170..c45dcbdabd 100644 --- a/test/integration/goldens/asset/AssetServiceClient.java +++ b/test/integration/goldens/asset/AssetServiceClient.java @@ -84,22 +84,22 @@ public class AssetServiceClient implements BackgroundResource { private final AssetServiceStub stub; private final OperationsClient operationsClient; - /** Constructs an instance of EchoClient with default settings. */ + /** Constructs an instance of AssetServiceClient with default settings. */ public static final AssetServiceClient create() throws IOException { return create(AssetServiceSettings.newBuilder().build()); } /** - * Constructs an instance of EchoClient, using the given settings. The channels are created based - * on the settings passed in, or defaults for any settings that are not set. + * Constructs an instance of AssetServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. */ public static final AssetServiceClient create(AssetServiceSettings settings) throws IOException { return new AssetServiceClient(settings); } /** - * Constructs an instance of EchoClient, using the given stub for making calls. This is for - * advanced usage - prefer using create(AssetServiceSettings). + * Constructs an instance of AssetServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(AssetServiceSettings). */ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final AssetServiceClient create(AssetServiceStub stub) { @@ -107,8 +107,9 @@ public static final AssetServiceClient create(AssetServiceStub stub) { } /** - * Constructs an instance of EchoClient, using the given settings. This is protected so that it is - * easy to make a subclass, but otherwise, the static factory methods should be preferred. + * Constructs an instance of AssetServiceClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. */ protected AssetServiceClient(AssetServiceSettings settings) throws IOException { this.settings = settings; diff --git a/test/integration/goldens/logging/ConfigServiceV2Client.java b/test/integration/goldens/logging/ConfigServiceV2Client.java index f3b1c319ba..930d4fa1c9 100644 --- a/test/integration/goldens/logging/ConfigServiceV2Client.java +++ b/test/integration/goldens/logging/ConfigServiceV2Client.java @@ -80,14 +80,14 @@ public class ConfigServiceV2Client implements BackgroundResource { private final ConfigServiceV2Settings settings; private final ConfigServiceV2Stub stub; - /** Constructs an instance of EchoClient with default settings. */ + /** Constructs an instance of ConfigServiceV2Client with default settings. */ public static final ConfigServiceV2Client create() throws IOException { return create(ConfigServiceV2Settings.newBuilder().build()); } /** - * Constructs an instance of EchoClient, using the given settings. The channels are created based - * on the settings passed in, or defaults for any settings that are not set. + * Constructs an instance of ConfigServiceV2Client, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. */ public static final ConfigServiceV2Client create(ConfigServiceV2Settings settings) throws IOException { @@ -95,8 +95,8 @@ public static final ConfigServiceV2Client create(ConfigServiceV2Settings setting } /** - * Constructs an instance of EchoClient, using the given stub for making calls. This is for - * advanced usage - prefer using create(ConfigServiceV2Settings). + * Constructs an instance of ConfigServiceV2Client, using the given stub for making calls. This is + * for advanced usage - prefer using create(ConfigServiceV2Settings). */ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final ConfigServiceV2Client create(ConfigServiceV2Stub stub) { @@ -104,8 +104,9 @@ public static final ConfigServiceV2Client create(ConfigServiceV2Stub stub) { } /** - * Constructs an instance of EchoClient, using the given settings. This is protected so that it is - * easy to make a subclass, but otherwise, the static factory methods should be preferred. + * Constructs an instance of ConfigServiceV2Client, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. */ protected ConfigServiceV2Client(ConfigServiceV2Settings settings) throws IOException { this.settings = settings; diff --git a/test/integration/goldens/logging/LoggingServiceV2Client.java b/test/integration/goldens/logging/LoggingServiceV2Client.java index 2bbf50ba65..838256ea3a 100644 --- a/test/integration/goldens/logging/LoggingServiceV2Client.java +++ b/test/integration/goldens/logging/LoggingServiceV2Client.java @@ -82,14 +82,14 @@ public class LoggingServiceV2Client implements BackgroundResource { private final LoggingServiceV2Settings settings; private final LoggingServiceV2Stub stub; - /** Constructs an instance of EchoClient with default settings. */ + /** Constructs an instance of LoggingServiceV2Client with default settings. */ public static final LoggingServiceV2Client create() throws IOException { return create(LoggingServiceV2Settings.newBuilder().build()); } /** - * Constructs an instance of EchoClient, using the given settings. The channels are created based - * on the settings passed in, or defaults for any settings that are not set. + * Constructs an instance of LoggingServiceV2Client, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. */ public static final LoggingServiceV2Client create(LoggingServiceV2Settings settings) throws IOException { @@ -97,8 +97,8 @@ public static final LoggingServiceV2Client create(LoggingServiceV2Settings setti } /** - * Constructs an instance of EchoClient, using the given stub for making calls. This is for - * advanced usage - prefer using create(LoggingServiceV2Settings). + * Constructs an instance of LoggingServiceV2Client, using the given stub for making calls. This + * is for advanced usage - prefer using create(LoggingServiceV2Settings). */ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final LoggingServiceV2Client create(LoggingServiceV2Stub stub) { @@ -106,8 +106,9 @@ public static final LoggingServiceV2Client create(LoggingServiceV2Stub stub) { } /** - * Constructs an instance of EchoClient, using the given settings. This is protected so that it is - * easy to make a subclass, but otherwise, the static factory methods should be preferred. + * Constructs an instance of LoggingServiceV2Client, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. */ protected LoggingServiceV2Client(LoggingServiceV2Settings settings) throws IOException { this.settings = settings; diff --git a/test/integration/goldens/logging/MetricsServiceV2Client.java b/test/integration/goldens/logging/MetricsServiceV2Client.java index 9341c256f0..2a1fefb209 100644 --- a/test/integration/goldens/logging/MetricsServiceV2Client.java +++ b/test/integration/goldens/logging/MetricsServiceV2Client.java @@ -79,14 +79,14 @@ public class MetricsServiceV2Client implements BackgroundResource { private final MetricsServiceV2Settings settings; private final MetricsServiceV2Stub stub; - /** Constructs an instance of EchoClient with default settings. */ + /** Constructs an instance of MetricsServiceV2Client with default settings. */ public static final MetricsServiceV2Client create() throws IOException { return create(MetricsServiceV2Settings.newBuilder().build()); } /** - * Constructs an instance of EchoClient, using the given settings. The channels are created based - * on the settings passed in, or defaults for any settings that are not set. + * Constructs an instance of MetricsServiceV2Client, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. */ public static final MetricsServiceV2Client create(MetricsServiceV2Settings settings) throws IOException { @@ -94,8 +94,8 @@ public static final MetricsServiceV2Client create(MetricsServiceV2Settings setti } /** - * Constructs an instance of EchoClient, using the given stub for making calls. This is for - * advanced usage - prefer using create(MetricsServiceV2Settings). + * Constructs an instance of MetricsServiceV2Client, using the given stub for making calls. This + * is for advanced usage - prefer using create(MetricsServiceV2Settings). */ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final MetricsServiceV2Client create(MetricsServiceV2Stub stub) { @@ -103,8 +103,9 @@ public static final MetricsServiceV2Client create(MetricsServiceV2Stub stub) { } /** - * Constructs an instance of EchoClient, using the given settings. This is protected so that it is - * easy to make a subclass, but otherwise, the static factory methods should be preferred. + * Constructs an instance of MetricsServiceV2Client, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. */ protected MetricsServiceV2Client(MetricsServiceV2Settings settings) throws IOException { this.settings = settings; diff --git a/test/integration/goldens/redis/CloudRedisClient.java b/test/integration/goldens/redis/CloudRedisClient.java index 83a43c2b11..9ee1fc706f 100644 --- a/test/integration/goldens/redis/CloudRedisClient.java +++ b/test/integration/goldens/redis/CloudRedisClient.java @@ -93,21 +93,21 @@ public class CloudRedisClient implements BackgroundResource { private final CloudRedisStub stub; private final OperationsClient operationsClient; - /** Constructs an instance of EchoClient with default settings. */ + /** Constructs an instance of CloudRedisClient with default settings. */ public static final CloudRedisClient create() throws IOException { return create(CloudRedisSettings.newBuilder().build()); } /** - * Constructs an instance of EchoClient, using the given settings. The channels are created based - * on the settings passed in, or defaults for any settings that are not set. + * Constructs an instance of CloudRedisClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. */ public static final CloudRedisClient create(CloudRedisSettings settings) throws IOException { return new CloudRedisClient(settings); } /** - * Constructs an instance of EchoClient, using the given stub for making calls. This is for + * Constructs an instance of CloudRedisClient, using the given stub for making calls. This is for * advanced usage - prefer using create(CloudRedisSettings). */ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") @@ -116,8 +116,8 @@ public static final CloudRedisClient create(CloudRedisStub stub) { } /** - * Constructs an instance of EchoClient, using the given settings. This is protected so that it is - * easy to make a subclass, but otherwise, the static factory methods should be preferred. + * Constructs an instance of CloudRedisClient, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. */ protected CloudRedisClient(CloudRedisSettings settings) throws IOException { this.settings = settings;