Add more tests
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
b2d5609352
commit
f0753eeb22
14 changed files with 1060 additions and 54 deletions
|
|
@ -200,7 +200,7 @@ func (s *sqlDatabase) DeleteGithubEndpoint(_ context.Context, name string) (err
|
|||
}
|
||||
|
||||
if credsCount > 0 || repoCnt > 0 || orgCnt > 0 || entCnt > 0 {
|
||||
return errors.New("cannot delete endpoint with associated entities")
|
||||
return runnerErrors.NewBadRequestError("cannot delete endpoint with associated entities")
|
||||
}
|
||||
|
||||
if err := tx.Unscoped().Delete(&endpoint).Error; err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue