Skip to content

Commit 28700e5

Browse files
andrey-qlogicchingor13
authored andcommitted
---
yaml --- r: 14461 b: refs/heads/autosynth-vision c: a9a7044 h: refs/heads/master i: 14459: 8d0778c
1 parent 8043736 commit 28700e5

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

  • branches/autosynth-vision/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
@@ -118,7 +118,7 @@ refs/heads/autosynth-dataproc: bc74a8841bc1693d7945d991d15979df550b1fd1
118118
refs/heads/autosynth-monitoring: e67db7395a868e5f6ecc3476eb4a91c47abd4234
119119
refs/heads/autosynth-pubsub: fd363d13793a853214eb8193c922b28c54e7a6b3
120120
refs/heads/autosynth-video-intelligence: e44c9746407fe00fac42e1bb10ac50f493dd37b0
121-
refs/heads/autosynth-vision: a6a23024f0328be03ed4f40fed9e5cab8f875e68
121+
refs/heads/autosynth-vision: a9a70442bf6bafbf46c82a76945632a455f2a4c1
122122
refs/heads/spanner: 54a5e197bfe0a004e13c190427f46c3413ab572d
123123
refs/tags/v0.68.0: 9cc799fcf68c82ab431d425fefa58ef615ce8e5b
124124
refs/tags/v0.69.0: 78f67a29e8b9c46ba01de566a2eae0fd1c03edea

branches/autosynth-vision/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)