diff --git a/server/conn_test.go b/server/conn_test.go index b3d1f57db1577..cd35257d72454 100644 --- a/server/conn_test.go +++ b/server/conn_test.go @@ -180,7 +180,6 @@ func TestInitialHandshake(t *testing.T) { var outBuffer bytes.Buffer cfg := newTestConfig() - cfg.Socket = "" cfg.Port = 0 cfg.Status.StatusPort = 0 drv := NewTiDBDriver(store) @@ -489,7 +488,6 @@ func testDispatch(t *testing.T, inputs []dispatchInput, capability uint32) { var outBuffer bytes.Buffer tidbdrv := NewTiDBDriver(store) cfg := newTestConfig() - cfg.Socket = "" cfg.Port, cfg.Status.StatusPort = 0, 0 cfg.Status.ReportStatus = false server, err := NewServer(cfg, tidbdrv) @@ -1134,7 +1132,6 @@ func TestAuthPlugin2(t *testing.T) { defer clean() cfg := newTestConfig() - cfg.Socket = "" cfg.Port = 0 cfg.Status.StatusPort = 0 diff --git a/server/tidb_serial_test.go b/server/tidb_serial_test.go index b5f2483584052..68b5d634a5a4a 100644 --- a/server/tidb_serial_test.go +++ b/server/tidb_serial_test.go @@ -106,7 +106,6 @@ func TestTLSAuto(t *testing.T) { } cli := newTestServerClient() cfg := newTestConfig() - cfg.Socket = "" cfg.Port = cli.port cfg.Status.ReportStatus = false cfg.Security.AutoTLS = true @@ -162,7 +161,6 @@ func TestTLSBasic(t *testing.T) { } cli := newTestServerClient() cfg := newTestConfig() - cfg.Socket = "" cfg.Port = cli.port cfg.Status.ReportStatus = false cfg.Security = config.Security{ @@ -234,7 +232,6 @@ func TestTLSVerify(t *testing.T) { // Start the server with TLS & CA, if the client presents its certificate, the certificate will be verified. cli := newTestServerClient() cfg := newTestConfig() - cfg.Socket = "" cfg.Port = cli.port cfg.Status.ReportStatus = false cfg.Security = config.Security{ @@ -302,7 +299,6 @@ func TestErrorNoRollback(t *testing.T) { cli := newTestServerClient() cfg := newTestConfig() - cfg.Socket = "" cfg.Port = cli.port cfg.Status.ReportStatus = false @@ -422,7 +418,6 @@ func TestReloadTLS(t *testing.T) { // try old cert used in startup configuration. cli := newTestServerClient() cfg := newTestConfig() - cfg.Socket = "" cfg.Port = cli.port cfg.Status.ReportStatus = false cfg.Security = config.Security{ diff --git a/server/tidb_test.go b/server/tidb_test.go index c76ad1957a766..eab37278c5b64 100644 --- a/server/tidb_test.go +++ b/server/tidb_test.go @@ -76,7 +76,6 @@ func createTidbTestSuite(t *testing.T) (*tidbTestSuite, func()) { require.NoError(t, err) ts.tidbdrv = NewTiDBDriver(ts.store) cfg := newTestConfig() - cfg.Socket = "" cfg.Port = ts.port cfg.Status.ReportStatus = true cfg.Status.StatusPort = ts.statusPort @@ -242,7 +241,6 @@ func TestStatusPort(t *testing.T) { defer cleanup() cfg := newTestConfig() - cfg.Socket = "" cfg.Port = 0 cfg.Status.ReportStatus = true cfg.Status.StatusPort = ts.statusPort @@ -273,7 +271,6 @@ func TestStatusAPIWithTLS(t *testing.T) { cli := newTestServerClient() cli.statusScheme = "https" cfg := newTestConfig() - cfg.Socket = "" cfg.Port = cli.port cfg.Status.StatusPort = cli.statusPort cfg.Security.ClusterSSLCA = "/tmp/ca-cert-2.pem" @@ -329,7 +326,6 @@ func TestStatusAPIWithTLSCNCheck(t *testing.T) { cli := newTestServerClient() cli.statusScheme = "https" cfg := newTestConfig() - cfg.Socket = "" cfg.Port = cli.port cfg.Status.StatusPort = cli.statusPort cfg.Security.ClusterSSLCA = caPath @@ -887,7 +883,6 @@ func TestSystemTimeZone(t *testing.T) { tk := testkit.NewTestKit(t, ts.store) cfg := newTestConfig() - cfg.Socket = "" cfg.Port, cfg.Status.StatusPort = 0, 0 cfg.Status.ReportStatus = false server, err := NewServer(cfg, ts.tidbdrv) @@ -1216,7 +1211,6 @@ func TestGracefulShutdown(t *testing.T) { cli := newTestServerClient() cfg := newTestConfig() - cfg.Socket = "" cfg.GracefulWaitBeforeShutdown = 2 // wait before shutdown cfg.Port = 0 cfg.Status.StatusPort = 0 diff --git a/server/util_test.go b/server/util_test.go index 35680210b75e4..c60f00bdf4e51 100644 --- a/server/util_test.go +++ b/server/util_test.go @@ -604,5 +604,6 @@ func newTestConfig() *config.Config { cfg.Host = "127.0.0.1" cfg.Status.StatusHost = "127.0.0.1" cfg.Security.AutoTLS = false + cfg.Socket = "" return cfg }