MCPcopy
hub / github.com/sa7mon/S3Scanner / TestWork

Function TestWork

worker/worker_test.go:14–27  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

12)
13
14func TestWork(t *testing.T) {
15 b := bucket.NewBucket("s3scanner-bucketsize")
16 aws, err := provider.NewProviderAWS()
17 assert.Nil(t, err)
18 b2, exErr := aws.BucketExists(&b)
19 assert.Nil(t, exErr)
20
21 wg := sync.WaitGroup{}
22 wg.Add(1)
23 c := make(chan bucket.Bucket, 1)
24 c <- *b2
25 close(c)
26 Work(&wg, c, aws, true, false, false)
27}
28
29func TestLogs(t *testing.T) {
30 var buf bytes.Buffer

Callers

nothing calls this directly

Calls 5

NewBucketFunction · 0.92
NewProviderAWSFunction · 0.92
WorkFunction · 0.85
AddMethod · 0.80
BucketExistsMethod · 0.65

Tested by

no test coverage detected