harbor/src/testing/registryctl/client.go
Wang Yan f6c0608e22
fix GC jobs upgrade issue (#11365)
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>
2020-04-01 11:53:41 +08:00

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
}