Fix tests post-rebase
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
eb1456479b
commit
e8ea7117ce
3 changed files with 6 additions and 6 deletions
|
|
@ -216,8 +216,8 @@ func (s *EnterpriseTestSuite) TestCreateEnterpriseInvalidDBPassphrase() {
|
|||
func (s *EnterpriseTestSuite) TestCreateEnterpriseDBCreateErr() {
|
||||
s.Fixtures.SQLMock.ExpectBegin()
|
||||
s.Fixtures.SQLMock.
|
||||
ExpectQuery(regexp.QuoteMeta("SELECT * FROM `github_credentials` WHERE name = ? AND `github_credentials`.`deleted_at` IS NULL ORDER BY `github_credentials`.`id` LIMIT 1")).
|
||||
WithArgs(s.Fixtures.Enterprises[0].CredentialsName).
|
||||
ExpectQuery(regexp.QuoteMeta("SELECT * FROM `github_credentials` WHERE name = ? AND `github_credentials`.`deleted_at` IS NULL ORDER BY `github_credentials`.`id` LIMIT ?")).
|
||||
WithArgs(s.Fixtures.Enterprises[0].CredentialsName, 1).
|
||||
WillReturnRows(sqlmock.NewRows([]string{"id", "endpoint_name"}).AddRow(s.testCreds.ID, s.testCreds.Endpoint.Name))
|
||||
s.Fixtures.SQLMock.ExpectQuery(regexp.QuoteMeta("SELECT * FROM `github_endpoints` WHERE `github_endpoints`.`name` = ? AND `github_endpoints`.`deleted_at` IS NULL")).
|
||||
WithArgs(s.testCreds.Endpoint.Name).
|
||||
|
|
|
|||
|
|
@ -217,8 +217,8 @@ func (s *OrgTestSuite) TestCreateOrganizationInvalidDBPassphrase() {
|
|||
func (s *OrgTestSuite) TestCreateOrganizationDBCreateErr() {
|
||||
s.Fixtures.SQLMock.ExpectBegin()
|
||||
s.Fixtures.SQLMock.
|
||||
ExpectQuery(regexp.QuoteMeta("SELECT * FROM `github_credentials` WHERE name = ? AND `github_credentials`.`deleted_at` IS NULL ORDER BY `github_credentials`.`id` LIMIT 1")).
|
||||
WithArgs(s.Fixtures.Orgs[0].CredentialsName).
|
||||
ExpectQuery(regexp.QuoteMeta("SELECT * FROM `github_credentials` WHERE name = ? AND `github_credentials`.`deleted_at` IS NULL ORDER BY `github_credentials`.`id` LIMIT ?")).
|
||||
WithArgs(s.Fixtures.Orgs[0].CredentialsName, 1).
|
||||
WillReturnRows(sqlmock.NewRows([]string{"id", "endpoint_name"}).
|
||||
AddRow(s.testCreds.ID, s.githubEndpoint.Name))
|
||||
s.Fixtures.SQLMock.ExpectQuery(regexp.QuoteMeta("SELECT * FROM `github_endpoints` WHERE `github_endpoints`.`name` = ? AND `github_endpoints`.`deleted_at` IS NULL")).
|
||||
|
|
|
|||
|
|
@ -233,8 +233,8 @@ func (s *RepoTestSuite) TestCreateRepositoryInvalidDBPassphrase() {
|
|||
func (s *RepoTestSuite) TestCreateRepositoryInvalidDBCreateErr() {
|
||||
s.Fixtures.SQLMock.ExpectBegin()
|
||||
s.Fixtures.SQLMock.
|
||||
ExpectQuery(regexp.QuoteMeta("SELECT * FROM `github_credentials` WHERE name = ? AND `github_credentials`.`deleted_at` IS NULL ORDER BY `github_credentials`.`id` LIMIT 1")).
|
||||
WithArgs(s.Fixtures.Repos[0].CredentialsName).
|
||||
ExpectQuery(regexp.QuoteMeta("SELECT * FROM `github_credentials` WHERE name = ? AND `github_credentials`.`deleted_at` IS NULL ORDER BY `github_credentials`.`id` LIMIT ?")).
|
||||
WithArgs(s.Fixtures.Repos[0].CredentialsName, 1).
|
||||
WillReturnRows(sqlmock.NewRows([]string{"id", "endpoint_name"}).
|
||||
AddRow(s.testCreds.ID, s.githubEndpoint.Name))
|
||||
s.Fixtures.SQLMock.ExpectQuery(regexp.QuoteMeta("SELECT * FROM `github_endpoints` WHERE `github_endpoints`.`name` = ? AND `github_endpoints`.`deleted_at` IS NULL")).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue