Skip to content

Commit 1f474f1

Browse files
andrey-qlogicchingor13
authored andcommitted
---
yaml --- r: 14633 b: refs/heads/autosynth-asset c: a9a7044 h: refs/heads/master i: 14631: d00f36d
1 parent 45d2e6f commit 1f474f1

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

  • branches/autosynth-asset/google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/it

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ refs/heads/autosynth-vision: b8e47d76578b5f150ef530072ea7e485e2b02ca0
122122
refs/heads/spanner: b01127f885b4611bf1852abb0ce481eeb7fcc131
123123
refs/tags/v0.68.0: 9cc799fcf68c82ab431d425fefa58ef615ce8e5b
124124
refs/tags/v0.69.0: 78f67a29e8b9c46ba01de566a2eae0fd1c03edea
125-
refs/heads/autosynth-asset: a6a23024f0328be03ed4f40fed9e5cab8f875e68
125+
refs/heads/autosynth-asset: a9a70442bf6bafbf46c82a76945632a455f2a4c1
126126
refs/heads/autosynth-automl: d4315b3596bac160e3439432c54435f44b09953e
127127
refs/heads/autosynth-bigquerydatatransfer: 2a9f3938237f85a8919602d74011326580ff387f
128128
refs/heads/autosynth-bigquerystorage: 99aee05df348f39d98b6fb23c292006f1d2a6c28

branches/autosynth-asset/google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/it/ITGcsNio.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
import org.junit.AfterClass;
6363
import org.junit.Assert;
6464
import org.junit.BeforeClass;
65-
import org.junit.Ignore;
6665
import org.junit.Test;
6766
import org.junit.runner.RunWith;
6867
import org.junit.runners.JUnit4;
@@ -157,7 +156,6 @@ private static void fillRequesterPaysFile(Storage storage, String fname, int siz
157156
}
158157

159158
// Start of tests related to the "requester pays" feature
160-
@Ignore("blocked by #3448")
161159
@Test
162160
public void testFileExistsRequesterPaysNoUserProject() throws IOException {
163161
CloudStorageFileSystem testBucket = getRequesterPaysBucket(false, "");
@@ -187,16 +185,15 @@ public void testFileExistsRequesterPaysWithAutodetect() throws IOException {
187185
Files.exists(path);
188186
}
189187

190-
@Ignore("blocked by #3448")
191188
@Test
192189
public void testCantCreateWithoutUserProject() throws IOException {
193190
CloudStorageFileSystem testBucket = getRequesterPaysBucket(false, "");
194-
Path path = testBucket.getPath(SML_FILE);
191+
Path path = testBucket.getPath(TMP_FILE);
195192
try {
196193
// fails
197194
Files.write(path, "I would like to write".getBytes());
198195
Assert.fail("It should have thrown an exception.");
199-
} catch (StorageException ex) {
196+
} catch (IOException ex) {
200197
assertIsRequesterPaysException("testCantCreateWithoutUserProject", ex);
201198
}
202199
}
@@ -209,7 +206,6 @@ public void testCanCreateWithUserProject() throws IOException {
209206
Files.write(path, "I would like to write, please?".getBytes());
210207
}
211208

212-
@Ignore("blocked by #3448")
213209
@Test
214210
public void testCantReadWithoutUserProject() throws IOException {
215211
CloudStorageFileSystem testBucket = getRequesterPaysBucket(false, "");
@@ -231,7 +227,6 @@ public void testCanReadWithUserProject() throws IOException {
231227
Files.readAllBytes(path);
232228
}
233229

234-
@Ignore("blocked by #3448")
235230
@Test
236231
public void testCantCopyWithoutUserProject() throws IOException {
237232
CloudStorageFileSystem testRPBucket = getRequesterPaysBucket(false, "");
@@ -324,6 +319,12 @@ private void assertIsRequesterPaysException(String message, StorageException ex)
324319
ex.getMessage().contains("Bucket is requester pays bucket but no user project provided"));
325320
}
326321

322+
private void assertIsRequesterPaysException(String message, IOException ioex) {
323+
Assert.assertTrue(message, ioex.getMessage().startsWith("400"));
324+
Assert.assertTrue(
325+
message,
326+
ioex.getMessage().contains("Bucket is requester pays bucket but no user project provided"));
327+
}
327328
// End of tests related to the "requester pays" feature
328329

329330
@Test

0 commit comments

Comments
 (0)