MCPcopy Create free account
hub / github.com/AdRoll/baker / TestIntegrationS3

Function TestIntegrationS3

upload/s3_integration_test.go:155–173  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

153}
154
155func 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}

Callers

nothing calls this directly

Calls 2

testIntegrationS3Function · 0.85
RunMethod · 0.65

Tested by

no test coverage detected