mirror of
https://github.com/goharbor/harbor.git
synced 2024-09-29 13:57:33 +02:00
f6c0608e22
Fixes #11313 Fixes #11275 1, Add more details log in GC job 2, Add type assertion for the upgrading case, the delete_untagged parameter is introduced from v2.0 3, Add UT Signed-off-by: wang yan <wangyan@vmware.com>
25 lines
398 B
Go
25 lines
398 B
Go
package registryctl
|
|
|
|
import (
|
|
"github.com/goharbor/harbor/src/registryctl/api"
|
|
"github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
type Mockclient struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// Health ...
|
|
func (c *Mockclient) Health() error {
|
|
return nil
|
|
}
|
|
|
|
// StartGC ...
|
|
func (c *Mockclient) StartGC() (*api.GCResult, error) {
|
|
result := &api.GCResult{
|
|
Status: true,
|
|
Msg: "this is a mock client",
|
|
}
|
|
return result, nil
|
|
}
|