Skip to content

Commit

Permalink
update ut mock anything (#19506)
Browse files Browse the repository at this point in the history
Signed-off-by: yminer <yminer@vmware.com>
  • Loading branch information
MinerYang authored Oct 31, 2023
1 parent 7c83e3a commit 6d81772
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/middleware/quota/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import (

func Test_projectReferenceObject(t *testing.T) {
ctl := &project.Controller{}
ctl.On("GetByName", mock.Anything, "library").Return(&proModels.Project{ProjectID: 1}, nil)
ctl.On("GetByName", mock.Anything, "demo").Return(nil, fmt.Errorf("not found"))
ctl.On("GetByName", mock.AnythingOfType("context.todoCtx"), "library").Return(&proModels.Project{ProjectID: 1}, nil)
ctl.On("GetByName", mock.AnythingOfType("context.todoCtx"), "demo").Return(nil, fmt.Errorf("not found"))

originalProjectController := projectController
defer func() {
Expand Down

0 comments on commit 6d81772

Please sign in to comment.