Skip to content

Commit e8ea711

Browse files
Fix tests post-rebase
Signed-off-by: Gabriel Adrian Samfira <[email protected]>
1 parent eb14564 commit e8ea711

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

database/sql/enterprise_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ func (s *EnterpriseTestSuite) TestCreateEnterpriseInvalidDBPassphrase() {
216216
func (s *EnterpriseTestSuite) TestCreateEnterpriseDBCreateErr() {
217217
s.Fixtures.SQLMock.ExpectBegin()
218218
s.Fixtures.SQLMock.
219-
ExpectQuery(regexp.QuoteMeta("SELECT * FROM `github_credentials` WHERE name = ? AND `github_credentials`.`deleted_at` IS NULL ORDER BY `github_credentials`.`id` LIMIT 1")).
220-
WithArgs(s.Fixtures.Enterprises[0].CredentialsName).
219+
ExpectQuery(regexp.QuoteMeta("SELECT * FROM `github_credentials` WHERE name = ? AND `github_credentials`.`deleted_at` IS NULL ORDER BY `github_credentials`.`id` LIMIT ?")).
220+
WithArgs(s.Fixtures.Enterprises[0].CredentialsName, 1).
221221
WillReturnRows(sqlmock.NewRows([]string{"id", "endpoint_name"}).AddRow(s.testCreds.ID, s.testCreds.Endpoint.Name))
222222
s.Fixtures.SQLMock.ExpectQuery(regexp.QuoteMeta("SELECT * FROM `github_endpoints` WHERE `github_endpoints`.`name` = ? AND `github_endpoints`.`deleted_at` IS NULL")).
223223
WithArgs(s.testCreds.Endpoint.Name).

database/sql/organizations_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ func (s *OrgTestSuite) TestCreateOrganizationInvalidDBPassphrase() {
217217
func (s *OrgTestSuite) TestCreateOrganizationDBCreateErr() {
218218
s.Fixtures.SQLMock.ExpectBegin()
219219
s.Fixtures.SQLMock.
220-
ExpectQuery(regexp.QuoteMeta("SELECT * FROM `github_credentials` WHERE name = ? AND `github_credentials`.`deleted_at` IS NULL ORDER BY `github_credentials`.`id` LIMIT 1")).
221-
WithArgs(s.Fixtures.Orgs[0].CredentialsName).
220+
ExpectQuery(regexp.QuoteMeta("SELECT * FROM `github_credentials` WHERE name = ? AND `github_credentials`.`deleted_at` IS NULL ORDER BY `github_credentials`.`id` LIMIT ?")).
221+
WithArgs(s.Fixtures.Orgs[0].CredentialsName, 1).
222222
WillReturnRows(sqlmock.NewRows([]string{"id", "endpoint_name"}).
223223
AddRow(s.testCreds.ID, s.githubEndpoint.Name))
224224
s.Fixtures.SQLMock.ExpectQuery(regexp.QuoteMeta("SELECT * FROM `github_endpoints` WHERE `github_endpoints`.`name` = ? AND `github_endpoints`.`deleted_at` IS NULL")).

database/sql/repositories_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ func (s *RepoTestSuite) TestCreateRepositoryInvalidDBPassphrase() {
233233
func (s *RepoTestSuite) TestCreateRepositoryInvalidDBCreateErr() {
234234
s.Fixtures.SQLMock.ExpectBegin()
235235
s.Fixtures.SQLMock.
236-
ExpectQuery(regexp.QuoteMeta("SELECT * FROM `github_credentials` WHERE name = ? AND `github_credentials`.`deleted_at` IS NULL ORDER BY `github_credentials`.`id` LIMIT 1")).
237-
WithArgs(s.Fixtures.Repos[0].CredentialsName).
236+
ExpectQuery(regexp.QuoteMeta("SELECT * FROM `github_credentials` WHERE name = ? AND `github_credentials`.`deleted_at` IS NULL ORDER BY `github_credentials`.`id` LIMIT ?")).
237+
WithArgs(s.Fixtures.Repos[0].CredentialsName, 1).
238238
WillReturnRows(sqlmock.NewRows([]string{"id", "endpoint_name"}).
239239
AddRow(s.testCreds.ID, s.githubEndpoint.Name))
240240
s.Fixtures.SQLMock.ExpectQuery(regexp.QuoteMeta("SELECT * FROM `github_endpoints` WHERE `github_endpoints`.`name` = ? AND `github_endpoints`.`deleted_at` IS NULL")).

0 commit comments

Comments
 (0)