mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-01 04:12:10 +00:00
test(mock): DeletePushMirrors & AddPushMirrorRemote
make them into variables that can be mocked
This commit is contained in:
parent
ba37b9e577
commit
5747951cc7
2 changed files with 6 additions and 2 deletions
|
@ -94,7 +94,9 @@ func UpdatePushMirrorInterval(ctx context.Context, m *PushMirror) error {
|
|||
return err
|
||||
}
|
||||
|
||||
func DeletePushMirrors(ctx context.Context, opts PushMirrorOptions) error {
|
||||
var DeletePushMirrors = deletePushMirrors
|
||||
|
||||
func deletePushMirrors(ctx context.Context, opts PushMirrorOptions) error {
|
||||
if opts.RepoID > 0 {
|
||||
_, err := db.Delete[PushMirror](ctx, opts)
|
||||
return err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue