Skip to content

Commit

Permalink
update mocks & lint
Browse files Browse the repository at this point in the history
Signed-off-by: bupd <[email protected]>
  • Loading branch information
bupd committed Dec 22, 2024
1 parent 12afc5c commit a997836
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/controller/replication/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"time"

"github.com/gocraft/work"
"github.com/goharbor/harbor/src/controller/jobmonitor"

"github.com/goharbor/harbor/src/controller/event/operator"
"github.com/goharbor/harbor/src/controller/jobmonitor"
"github.com/goharbor/harbor/src/controller/replication/flow"
replicationmodel "github.com/goharbor/harbor/src/controller/replication/model"
"github.com/goharbor/harbor/src/jobservice/job"
Expand Down Expand Up @@ -120,7 +120,6 @@ func (c *controller) Start(ctx context.Context, policy *replicationmodel.Policy,
}

if policy.SkipIfRunning {
log.Infof("kumar eh policy with ID %v skipped.", policy.ID)
monitorClient, err := jobmonitor.JobServiceMonitorClient()
if err != nil {
return 0, errors.New(nil).WithCode(errors.PreconditionCode).WithMessagef("unable to get job monitor's client: %v", err)
Expand Down
1 change: 1 addition & 0 deletions src/jobservice/job/impl/replication/replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package replication
import (
"encoding/json"
"fmt"

"github.com/goharbor/harbor/src/controller/replication/transfer"
// import chart transfer
_ "github.com/goharbor/harbor/src/controller/replication/transfer/image"
Expand Down
2 changes: 1 addition & 1 deletion src/server/v2.0/handler/replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ func convertReplicationPolicy(policy *repctlmodel.Policy) *models.ReplicationPol
Speed: &policy.Speed,
UpdateTime: strfmt.DateTime(policy.UpdateTime),
CopyByChunk: &policy.CopyByChunk,
SkipIfRunning: &policy.SkipIfRunning,
SkipIfRunning: &policy.SkipIfRunning,
}
if policy.SrcRegistry != nil {
p.SrcRegistry = convertRegistry(policy.SrcRegistry)
Expand Down
18 changes: 18 additions & 0 deletions src/testing/pkg/task/execution_manager.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a997836

Please sign in to comment.