Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sydney-munro committed Apr 8, 2024
1 parent 4009db9 commit 7e0264d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@
import java.nio.file.Path;
import java.util.List;
import java.util.stream.Collectors;

class DownloadBucket {

public static void downloadBucketContents(String projectId, String bucketName, Path destinationDirectory) {
public static void downloadBucketContents(String projectId,
String bucketName, Path destinationDirectory) {
Storage storage = StorageOptions.newBuilder().setProjectId(projectId).build().getService();
List<BlobInfo> blobs = storage
.list(bucketName)
Expand All @@ -47,7 +49,9 @@ public static void downloadBucketContents(String projectId, String bucketName, P
.getDownloadResults();

for (DownloadResult result : results) {
System.out.println("Download of " + result.getInput().getName() + " completed with status " + result.getStatus());
System.out.println("Download of " + result.getInput().getName()
+ " completed with status "
+ result.getStatus());
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ public static void beforeClass() {
blobs = Arrays.asList(BlobInfo.newBuilder(BUCKET, "blob1").build(),
BlobInfo.newBuilder(BUCKET, "blob2").build(),
BlobInfo.newBuilder(BUCKET, "blob3").build());
for(BlobInfo blob : blobs) {
for (BlobInfo blob : blobs)
storage.create(blob);
}
}
@Test
public void uploadFiles() throws Exception {
Expand All @@ -70,7 +69,7 @@ public void uploadFiles() throws Exception {
assertThat(snippetOutput.contains("file2.txt")).isTrue();
assertThat(snippetOutput.contains("file3.txt")).isTrue();
}

@Test
public void downloadFiles() {
DownloadMany.downloadManyBlobs(PROJECT_ID, BUCKET, blobs, tmp.getRoot().toPath());
Expand Down

0 comments on commit 7e0264d

Please sign in to comment.