Skip to content

Commit

Permalink
update alibaba-cloud-sdk-go utils RandStringBytes to GetNonce
Browse files Browse the repository at this point in the history
Signed-off-by: yminer <[email protected]>
  • Loading branch information
yminer committed Nov 6, 2024
1 parent 3eb5a0e commit 0156fa0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/controller/robot/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (suite *ControllerTestSuite) TestGet() {
Name: "library+test",
Description: "test get method",
ProjectID: 1,
Secret: utils.RandStringBytes(10),
Secret: utils.GetNonce(),
}, nil)
rbacMgr.On("GetPermissionsByRole", mock.Anything, mock.Anything, mock.Anything).Return([]*rbac_model.UniversalRolePermission{
{
Expand Down Expand Up @@ -153,7 +153,7 @@ func (suite *ControllerTestSuite) TestDelete() {
Name: "library+test",
Description: "test get method",
ProjectID: 1,
Secret: utils.RandStringBytes(10),
Secret: utils.GetNonce(),
}, nil)
robotMgr.On("Delete", mock.Anything, mock.Anything).Return(nil)
rbacMgr.On("DeletePermissionsByRole", mock.Anything, mock.Anything, mock.Anything).Return(nil)
Expand Down Expand Up @@ -226,7 +226,7 @@ func (suite *ControllerTestSuite) TestList() {
Name: "test",
Description: "test list method",
ProjectID: 1,
Secret: utils.RandStringBytes(10),
Secret: utils.GetNonce(),
},
}, nil)
rbacMgr.On("GetPermissionsByRole", mock.Anything, mock.Anything, mock.Anything).Return([]*rbac_model.UniversalRolePermission{
Expand Down

0 comments on commit 0156fa0

Please sign in to comment.