-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathschema_test.go
64 lines (58 loc) · 1.44 KB
/
schema_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
53
54
55
56
57
58
59
60
61
62
63
64
package schema
import (
"database/sql"
)
// Interface verification that *sql.DB satisfies our Connection interface
var (
_ Connection = &sql.DB{}
)
// Interface verification that *sql.DB satisfies our Transactor interface
var (
_ Transactor = &sql.DB{}
)
// Interface verification that *sql.Tx and *sql.DB both satisfy our
// Queryer interface
var (
_ Queryer = &sql.DB{}
_ Queryer = &sql.Tx{}
)
const (
PostgresDriverName = "postgres"
SQLiteDriverName = "sqlite3"
MySQLDriverName = "mysql"
MSSQLDriverName = "sqlserver"
)
// TestDBs holds all of the specific database instances against which tests
// will run. The connectDB test helper references the keys of this map, and
// the withEachDB helper runs tests against every database defined here.
var TestDBs map[string]*TestDB = map[string]*TestDB{
"postgres:latest": {
Dialect: Postgres,
Driver: PostgresDriverName,
DockerRepo: "postgres",
DockerTag: "latest",
},
"sqlite": {
Dialect: SQLite,
Driver: SQLiteDriverName,
},
"mysql:latest": {
Dialect: MySQL,
Driver: MySQLDriverName,
DockerRepo: "mysql/mysql-server",
DockerTag: "latest",
},
"mariadb:latest": {
Dialect: MySQL,
Driver: MySQLDriverName,
DockerRepo: "mariadb",
DockerTag: "latest",
},
"mssql:latest": {
Dialect: MSSQL,
Driver: MSSQLDriverName,
DockerRepo: "mcr.microsoft.com/mssql/server",
DockerTag: "2019-latest",
// SkippedArchs: []string{"amd64"},
},
}