(t *testing.T)
| 153 | } |
| 154 | |
| 155 | func TestIntegrationS3(t *testing.T) { |
| 156 | // This test configures a pipelines from the ground up by passing it a TOML, |
| 157 | // mocks S3 to not rely on an external service. The created topology is then |
| 158 | // ran in conditions that are very similar to what would happen in production |
| 159 | // with a batch workload (i.e process an pre-specified amount of record and |
| 160 | // exits). |
| 161 | // |
| 162 | // The topology should end by itself without any error, we also checks that |
| 163 | t.Run("topology.wait", testIntegrationS3(false)) |
| 164 | |
| 165 | // the expected number of files have been uploaded to their expected bucket/key. |
| 166 | // On the second subtest we immeditately stop the topology after starting it, |
| 167 | // but the outcome should be the same since we wait enough time for the input |
| 168 | // to produce the records, which means topology.Stop() should block until: |
| 169 | // - all records have been processed, |
| 170 | // - all files have been written by the output |
| 171 | // - all files have been uplodaed by the S3 upload |
| 172 | t.Run("topology.stop", testIntegrationS3(true)) |
| 173 | } |
nothing calls this directly
no test coverage detected