|
54 | 54 | import org.apache.tika.pipes.core.pipesiterator.PipesIterator; |
55 | 55 | import org.apache.tika.pipes.emitter.s3.S3Emitter; |
56 | 56 |
|
| 57 | +// To enable these tests, fill OUTDIR and bucket, and adjust profile and region if needed. |
57 | 58 | @Disabled("turn these into actual tests with mock s3") |
58 | 59 | public class PipeIntegrationTests { |
59 | 60 |
|
60 | 61 | private static final Path OUTDIR = Paths.get(""); |
61 | 62 |
|
| 63 | + /** |
| 64 | + * This downloads files from a specific bucket. |
| 65 | + * @throws Exception |
| 66 | + */ |
62 | 67 | @Test |
63 | 68 | public void testBruteForce() throws Exception { |
64 | | - String region = ""; |
65 | | - String profile = ""; |
| 69 | + String region = "us-east-1"; |
| 70 | + String profile = "default"; |
66 | 71 | String bucket = ""; |
67 | 72 | AwsCredentialsProvider provider = ProfileCredentialsProvider.builder().profileName(profile).build(); |
68 | 73 | S3Client s3Client = S3Client.builder().credentialsProvider(provider).region(Region.of(region)).build(); |
@@ -91,6 +96,7 @@ public void testBruteForce() throws Exception { |
91 | 96 | System.out.println("iterated: " + cnt + " sz: " + sz); |
92 | 97 | } |
93 | 98 |
|
| 99 | + // to test this, files must be in the fetcher bucket |
94 | 100 | @Test |
95 | 101 | public void testS3ToFS() throws Exception { |
96 | 102 | Fetcher fetcher = getFetcher("tika-config-s3ToFs.xml", "s3f"); |
@@ -121,6 +127,7 @@ public void testS3ToFS() throws Exception { |
121 | 127 | } |
122 | 128 | } |
123 | 129 |
|
| 130 | + // to test this, files must be in the iterator bucket |
124 | 131 | @Test |
125 | 132 | public void testS3ToS3() throws Exception { |
126 | 133 | Fetcher fetcher = getFetcher("tika-config-s3Tos3.xml", "s3f"); |
|
0 commit comments