MCPcopy
hub / github.com/ent/ent / TestMySQL

Function TestMySQL

entc/integration/integration_test.go:72–88  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

70}
71
72func TestMySQL(t *testing.T) {
73 for version, port := range map[string]int{"56": 3306, "57": 3307, "8": 3308} {
74 addr := net.JoinHostPort("localhost", strconv.Itoa(port))
75 t.Run(version, func(t *testing.T) {
76 t.Parallel()
77 client := enttest.Open(t, dialect.MySQL, fmt.Sprintf("root:pass@tcp(%s)/test?parseTime=True", addr), opts)
78 defer client.Close()
79 for _, tt := range tests {
80 name := runtime.FuncForPC(reflect.ValueOf(tt).Pointer()).Name()
81 t.Run(name[strings.LastIndex(name, ".")+1:], func(t *testing.T) {
82 drop(t, client)
83 tt(t, client)
84 })
85 }
86 })
87 }
88}
89
90func TestMaria(t *testing.T) {
91 for version, port := range map[string]int{"10.5": 4306, "10.2": 4307, "10.3": 4308} {

Callers

nothing calls this directly

Calls 5

OpenFunction · 0.92
RunMethod · 0.80
dropFunction · 0.70
CloseMethod · 0.65
NameMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…