mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-01 04:21:36 +01:00
fix ut case failures
Signed-off-by: Steven Zou <szou@vmware.com>
This commit is contained in:
parent
1e7f51615f
commit
f29d50e6dd
@ -15,15 +15,15 @@
|
||||
package action
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/goharbor/harbor/src/pkg/retention/dep"
|
||||
"github.com/goharbor/harbor/src/pkg/retention/policy/lwp"
|
||||
"github.com/goharbor/harbor/src/pkg/retention/res"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
// TestPerformerSuite tests the performer related function
|
||||
@ -106,7 +106,7 @@ func (frc *fakeRetentionClient) Delete(candidate *res.Candidate) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// SubmitTask ...
|
||||
func (frc *fakeRetentionClient) SubmitTask(taskID int64, repository *res.Repository, meta *lwp.Metadata) (string, error) {
|
||||
return "", errors.New("not implemented")
|
||||
// DeleteRepository ...
|
||||
func (frc *fakeRetentionClient) DeleteRepository(repo *res.Repository) error {
|
||||
panic("implement me")
|
||||
}
|
||||
|
@ -22,7 +22,6 @@ import (
|
||||
"github.com/goharbor/harbor/src/pkg/retention/dep"
|
||||
"github.com/goharbor/harbor/src/pkg/retention/policy/action"
|
||||
"github.com/goharbor/harbor/src/pkg/retention/policy/alg"
|
||||
"github.com/goharbor/harbor/src/pkg/retention/policy/lwp"
|
||||
"github.com/goharbor/harbor/src/pkg/retention/policy/rule"
|
||||
"github.com/goharbor/harbor/src/pkg/retention/policy/rule/always"
|
||||
"github.com/goharbor/harbor/src/pkg/retention/policy/rule/lastx"
|
||||
@ -171,7 +170,7 @@ func (frc *fakeRetentionClient) Delete(candidate *res.Candidate) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// SubmitTask ...
|
||||
func (frc *fakeRetentionClient) SubmitTask(taskID int64, repository *res.Repository, meta *lwp.Metadata) (string, error) {
|
||||
return "", errors.New("not implemented")
|
||||
// DeleteRepository ...
|
||||
func (frc *fakeRetentionClient) DeleteRepository(repo *res.Repository) error {
|
||||
panic("implement me")
|
||||
}
|
||||
|
@ -161,6 +161,10 @@ func (suite *TestBuilderSuite) TestBuild() {
|
||||
|
||||
type fakeRetentionClient struct{}
|
||||
|
||||
func (frc *fakeRetentionClient) DeleteRepository(repo *res.Repository) error {
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
// GetCandidates ...
|
||||
func (frc *fakeRetentionClient) GetCandidates(repo *res.Repository) ([]*res.Candidate, error) {
|
||||
return nil, errors.New("not implemented")
|
||||
|
Loading…
Reference in New Issue
Block a user