Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: try to debug failing integrations #45

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ public static void beforeClass() throws IOException {
RemoteStorageHelper gcsHelper = RemoteStorageHelper.create();
storageOptions = gcsHelper.getOptions();
project = storageOptions.getProjectId();
System.out.println(project);
System.out.println(BUCKET);
storage = storageOptions.getService();
// create and populate test bucket
storage.create(BucketInfo.of(BUCKET));
Expand Down Expand Up @@ -152,6 +154,7 @@ private static void fillFile(Storage storage, String bucket, String fname, int s

private static void fillRequesterPaysFile(Storage storage, String fname, int size)
throws IOException {
System.out.println(REQUESTER_PAYS_BUCKET);
storage.create(
BlobInfo.newBuilder(REQUESTER_PAYS_BUCKET, fname).build(),
randomContents(size),
Expand Down Expand Up @@ -190,8 +193,11 @@ public void testFileExistsRequesterPaysWithAutodetect() throws IOException {

@Test
public void testCantCreateWithoutUserProject() throws IOException {
CloudStorageFileSystem testBucket = getRequesterPaysBucket(false, "");
CloudStorageFileSystem testBucket = getRequesterPaysBucket(false, null);
System.out.println(testBucket.config());
System.out.println(testBucket.bucket());
Path path = testBucket.getPath(TMP_FILE);
System.out.println(path);
try {
// fails
Files.write(path, "I would like to write".getBytes());
Expand Down