-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paths3_test.go
50 lines (41 loc) · 937 Bytes
/
s3_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package s3bdd
import (
"testing"
"github.com/cucumber/godog"
"github.com/joel-ling/s3-bdd/test"
)
func TestS3(t *testing.T) {
var (
scenarioInitializer = func(sc *godog.ScenarioContext) {
test.AddStepSetUp(sc)
test.AddStepNewS3Server(sc)
test.AddStepCreateBucket(sc)
test.AddStepListBuckets(sc)
test.AddStepPutObject(sc)
test.AddStepListObjects(sc)
test.AddStepListObjectsPrefix(sc)
test.AddStepListObjectsAfter(sc)
test.AddStepGetObject(sc)
test.AddStepSeeBucket(sc)
test.AddStepSeeObject(sc)
test.AddStepSeeContent(sc)
test.AddStepSeeError(sc)
test.AddStepSeeNoError(sc)
test.AddStepCleanUp(sc)
return
}
options = &godog.Options{
Format: "pretty",
Paths: []string{"features"},
TestingT: t,
}
suite = godog.TestSuite{
ScenarioInitializer: scenarioInitializer,
Options: options,
}
)
if suite.Run() != 0 {
t.Fatal()
}
return
}