fix(runner): return empty array instead of null for boltdb
Some checks are pending
Dev / build-local (push) Waiting to run
Dev / migrate-boltdb (push) Blocked by required conditions
Dev / migrate-mysql (push) Blocked by required conditions
Dev / migrate-mariadb (push) Blocked by required conditions
Dev / migrate-postgres (push) Blocked by required conditions
Dev / integrate-boltdb (push) Blocked by required conditions
Dev / integrate-mysql (push) Blocked by required conditions
Dev / integrate-mariadb (push) Blocked by required conditions
Dev / integrate-postgres (push) Blocked by required conditions
Dev / deploy-server (push) Blocked by required conditions
Dev / deploy-runner (push) Blocked by required conditions

This commit is contained in:
Denis Gukov 2024-11-22 17:14:16 +05:00
parent 8e525e753e
commit e43af6b493
2 changed files with 5 additions and 0 deletions

View File

@ -7,13 +7,16 @@ import (
) )
func (d *BoltDb) GetRunner(projectID int, runnerID int) (runner db.Runner, err error) { func (d *BoltDb) GetRunner(projectID int, runnerID int) (runner db.Runner, err error) {
err = db.ErrNotFound
return return
} }
func (d *BoltDb) GetRunners(projectID int, activeOnly bool) (runners []db.Runner, err error) { func (d *BoltDb) GetRunners(projectID int, activeOnly bool) (runners []db.Runner, err error) {
runners = make([]db.Runner, 0)
return return
} }
func (d *BoltDb) DeleteRunner(projectID int, runnerID int) (err error) { func (d *BoltDb) DeleteRunner(projectID int, runnerID int) (err error) {
err = db.ErrNotFound
return return
} }

View File

@ -7,6 +7,7 @@ import (
) )
func (d *SqlDb) GetRunner(projectID int, runnerID int) (runner db.Runner, err error) { func (d *SqlDb) GetRunner(projectID int, runnerID int) (runner db.Runner, err error) {
err = db.ErrNotFound
return return
} }
@ -16,5 +17,6 @@ func (d *SqlDb) GetRunners(projectID int, activeOnly bool) (runners []db.Runner,
} }
func (d *SqlDb) DeleteRunner(projectID int, runnerID int) (err error) { func (d *SqlDb) DeleteRunner(projectID int, runnerID int) (err error) {
err = db.ErrNotFound
return return
} }