(t *testing.T)
| 120 | } |
| 121 | |
| 122 | func TestMySQLMCPUnix(t *testing.T) { |
| 123 | if testing.Short() { |
| 124 | t.Skip("skipping MySQL integration tests") |
| 125 | } |
| 126 | requireMySQLVars(t) |
| 127 | tmpDir, cleanup := createTempDir(t) |
| 128 | defer cleanup() |
| 129 | |
| 130 | cfg := mysql.Config{ |
| 131 | User: *mysqlUser, |
| 132 | Passwd: *mysqlMCPPass, |
| 133 | DBName: *mysqlDB, |
| 134 | AllowNativePasswords: true, |
| 135 | // re-use utility function to determine the Unix address in a |
| 136 | // Windows-friendly way. |
| 137 | Addr: proxy.UnixAddress(tmpDir, *mysqlMCPConnName), |
| 138 | Net: "unix", |
| 139 | } |
| 140 | // Prepare the initial arguments |
| 141 | args := []string{"--unix-socket", tmpDir, *mysqlMCPConnName} |
| 142 | // Add the IP type flag using the helper |
| 143 | args = AddIPTypeFlag(args) |
| 144 | // Run the test |
| 145 | proxyConnTest(t, args, "mysql", cfg.FormatDSN()) |
| 146 | } |
| 147 | |
| 148 | func TestMySQLImpersonation(t *testing.T) { |
| 149 | if testing.Short() { |
nothing calls this directly
no test coverage detected