-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlmdb_test.go
52 lines (43 loc) · 997 Bytes
/
lmdb_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
51
52
package lmdbbdd
import (
"testing"
"github.com/cucumber/godog"
"github.com/joel-ling/lmdb-bdd/test"
)
func TestLMDB(t *testing.T) {
var (
scenarioInitializer = func(sc *godog.ScenarioContext) {
test.AddStepSetUp(sc)
test.AddStepNewLMDBEnv(sc)
test.AddStepPutRecord(sc)
test.AddStepGetRecord(sc)
test.AddStepOpenCursor(sc)
test.AddStepOpenCursorRoot(sc)
test.AddStepGetNextRecord(sc)
test.AddStepGetNextRecordSet(sc)
test.AddStepSeeRecord(sc)
test.AddStepResetCursor(sc)
test.AddStepRenewCursor(sc)
test.AddStepSeeKey(sc)
test.AddStepSeeValue(sc)
test.AddStepSeeError(sc)
test.AddStepSeeNoError(sc)
test.AddStepIDLastCommit(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
}