Skip to content

Commit

Permalink
Fix issues in test caused by test framework migration
Browse files Browse the repository at this point in the history
  • Loading branch information
dveeden committed Oct 12, 2021
1 parent 2b6ba0a commit afddb6a
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions server/conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -880,18 +880,20 @@ func (ts *ConnTestSuite) TestShowErrors(c *C) {
tk.MustQuery("show errors").Check(testkit.Rows("Error 1051 Unknown table 'test.idontexist'"))
}

func TestHandleAuthPlugin(t *testing.T) {
t.Parallel()

store, clean := testkit.CreateMockStore(t)
defer clean()
func (ts *ConnTestSuite) TestHandleAuthPlugin(c *C) {
store, err := mockstore.NewMockStore()
c.Assert(err, IsNil)
defer func() {
err := store.Close()
c.Assert(err, IsNil)
}()

cfg := newTestConfig()
cfg.Port = 0
cfg.Status.StatusPort = 0
drv := NewTiDBDriver(store)
srv, err := NewServer(cfg, drv)
require.NoError(t, err)
c.Assert(err, IsNil)

cc := &clientConn{
connectionID: 1,
Expand All @@ -906,9 +908,9 @@ func TestHandleAuthPlugin(t *testing.T) {
Capability: mysql.ClientProtocol41 | mysql.ClientPluginAuth,
}
err = cc.handleAuthPlugin(ctx, &resp)
require.NoError(t, err)
c.Assert(err, IsNil)

resp.Capability = mysql.ClientProtocol41
err = cc.handleAuthPlugin(ctx, &resp)
require.NoError(t, err)
c.Assert(err, IsNil)
}

0 comments on commit afddb6a

Please sign in to comment.