Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

test: fix test isn't suitable for an unordered output (#1372) #1374

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions checker/check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,13 @@ func (s *testCheckerSuite) TestDumpPrivilegeChecking(c *tc.C) {
mock := s.initMockDB(c)
mock.ExpectQuery("SHOW GRANTS").WillReturnRows(sqlmock.NewRows([]string{"Grants for User"}).
AddRow("GRANT USAGE ON *.* TO 'haha'@'%'"))
<<<<<<< HEAD
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expected statement, found '<<' (and 2 more errors)

c.Assert(CheckSyncConfig(context.Background(), cfgs), tc.ErrorMatches, "(.|\n)*lack of RELOAD,SELECT privilege(.|\n)*")
=======
err := CheckSyncConfig(context.Background(), cfgs)
c.Assert(err, tc.ErrorMatches, "(.|\n)*lack.*RELOAD(.|\n)*")
c.Assert(err, tc.ErrorMatches, "(.|\n)*lack.*Select(.|\n)*")
>>>>>>> de9de762... test: fix test isn't suitable for an unordered output (#1372)

mock = s.initMockDB(c)
mock.ExpectQuery("SHOW GRANTS").WillReturnRows(sqlmock.NewRows([]string{"Grants for User"}).
Expand Down