mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 10:15:35 +01:00
fix robot cannot update expirsat (#13944)
Signed-off-by: Wang Yan <wangyan@vmware.com>
This commit is contained in:
parent
5bff3e94a0
commit
64e61c0d11
@ -136,7 +136,7 @@ func (d *controller) Update(ctx context.Context, r *Robot, option *Option) error
|
||||
if r == nil {
|
||||
return errors.New("cannot update a nil robot").WithCode(errors.BadRequestCode)
|
||||
}
|
||||
if err := d.robotMgr.Update(ctx, &r.Robot, "secret", "description", "disabled", "duration"); err != nil {
|
||||
if err := d.robotMgr.Update(ctx, &r.Robot, "secret", "description", "disabled", "duration", "expiresat"); err != nil {
|
||||
return err
|
||||
}
|
||||
// update the permission
|
||||
|
@ -162,7 +162,7 @@ func (suite *ControllerTestSuite) TestUpdate() {
|
||||
}
|
||||
config.InitWithSettings(conf)
|
||||
|
||||
robotMgr.On("Update", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil)
|
||||
robotMgr.On("Update", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil)
|
||||
projectMgr.On("Get", mock.Anything, mock.Anything).Return(&models.Project{ProjectID: 1, Name: "library"}, nil)
|
||||
rbacMgr.On("DeletePermissionsByRole", mock.Anything, mock.Anything, mock.Anything).Return(nil)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user