Skip to content

Commit

Permalink
DLP dependency update, fix tests (#776)
Browse files Browse the repository at this point in the history
  • Loading branch information
jabubake authored and lesv committed Jul 30, 2017
1 parent 53415b7 commit f99f1e6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ before_install:
&& set +x && source secrets.env && set -x
|| true
# Cross project - GOOGLE_APPLICATION_CREDENTIALS uses cloud-docs-tests, but BQ uses G_C_P (argh!)
- export GOOGLE_CLOUD_PROJECT=java-docs-samples-tests
- export GOOGLE_CLOUD_PROJECT=java-docs-samples-testing
# Skip the install step, since Maven will download the dependencies we need
# when the test build runs.
# http://stackoverflow.com/q/31945809/101923
Expand Down
19 changes: 1 addition & 18 deletions dlp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,12 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<!-- Temporary workaround for known issue : https://github.com/GoogleCloudPlatform/google-cloud-java/issues/2192 -->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.auth</groupId>
<artifactId>google-auth-library-credentials</artifactId>
<version>${google.auth.version}</version>
</dependency>
<dependency>
<groupId>com.google.auth</groupId>
<artifactId>google-auth-library-oauth2-http</artifactId>
<version>${google.auth.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<!--- End of workaround -->

<dependencies>
<!-- [START dlp_maven] -->
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-dlp</artifactId>
<version>0.20.3-alpha</version>
<version>0.21.0-alpha</version>
</dependency>
<!-- [END dlp_maven] -->
<dependency>
Expand Down
7 changes: 4 additions & 3 deletions dlp/src/main/java/com/example/dlp/Inspect.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@

package com.example.dlp;

import com.google.api.gax.grpc.OperationFuture;
import com.google.api.gax.rpc.OperationFuture;
import com.google.cloud.ServiceOptions;
import com.google.cloud.dlp.v2beta1.DlpServiceClient;
import com.google.longrunning.Operation;
import com.google.privacy.dlp.v2beta1.CloudStorageOptions;
import com.google.privacy.dlp.v2beta1.CloudStorageOptions.FileSet;
import com.google.privacy.dlp.v2beta1.ContentItem;
Expand Down Expand Up @@ -226,7 +227,7 @@ private static void inspectGcsFile(String bucketName, String fileName,
OutputStorageConfig outputConfig = OutputStorageConfig.getDefaultInstance();

// asynchronously submit an inspect operation
OperationFuture<InspectOperationResult, InspectOperationMetadata> responseFuture =
OperationFuture<InspectOperationResult, InspectOperationMetadata, Operation> responseFuture =
dlpServiceClient.createInspectOperationAsync(inspectConfig, storageConfig, outputConfig);

// ...
Expand Down Expand Up @@ -291,7 +292,7 @@ private static void inspectDatastore(String projectId, String namespaceId, Strin
OutputStorageConfig outputConfig = OutputStorageConfig.getDefaultInstance();

// asynchronously submit an inspect operation
OperationFuture<InspectOperationResult, InspectOperationMetadata> responseFuture =
OperationFuture<InspectOperationResult, InspectOperationMetadata, Operation> responseFuture =
dlpServiceClient.createInspectOperationAsync(inspectConfig, storageConfig, outputConfig);

// ...
Expand Down

0 comments on commit f99f1e6

Please sign in to comment.