| 70 | } |
| 71 | |
| 72 | func 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 | |
| 90 | func TestMaria(t *testing.T) { |
| 91 | for version, port := range map[string]int{"10.5": 4306, "10.2": 4307, "10.3": 4308} { |