(t *testing.T)
| 29 | ) |
| 30 | |
| 31 | func newMySQLSorted(t *testing.T) sorted.KeyValue { |
| 32 | dbname := "camlitest_" + osutil.Username() |
| 33 | containerID, ip := dockertest.SetupMySQLContainer(t, dbname) |
| 34 | |
| 35 | kv, err := sorted.NewKeyValue(jsonconfig.Obj{ |
| 36 | "type": "mysql", |
| 37 | "host": ip + ":3306", |
| 38 | "database": dbname, |
| 39 | "user": dockertest.MySQLUsername, |
| 40 | "password": dockertest.MySQLPassword, |
| 41 | }) |
| 42 | if err != nil { |
| 43 | containerID.KillRemove(t) |
| 44 | t.Fatal(err) |
| 45 | } |
| 46 | t.Cleanup(func() { |
| 47 | kv.Close() |
| 48 | containerID.KillRemove(t) |
| 49 | |
| 50 | }) |
| 51 | return kv |
| 52 | } |
| 53 | |
| 54 | func TestSorted_MySQL(t *testing.T) { |
| 55 | kv := newMySQLSorted(t) |
no test coverage detected