test: fix failed ut

This commit is contained in:
Aaron Liu
2023-05-27 10:44:28 +08:00
parent 89ee147961
commit b1344616b8
8 changed files with 21 additions and 40 deletions

View File

@@ -16,7 +16,6 @@ import (
"io/ioutil"
"net/http"
"net/http/httptest"
"net/url"
"strings"
"testing"
)
@@ -60,8 +59,8 @@ func (m FileHeaderMock) Thumb(ctx context.Context, files *model.File) (*response
return args.Get(0).(*response.ContentResponse), args.Error(1)
}
func (m FileHeaderMock) Source(ctx context.Context, path string, url url.URL, expires int64, isDownload bool, speed int) (string, error) {
args := m.Called(ctx, path, url, expires, isDownload, speed)
func (m FileHeaderMock) Source(ctx context.Context, path string, expires int64, isDownload bool, speed int) (string, error) {
args := m.Called(ctx, path, expires, isDownload, speed)
return args.Get(0).(string), args.Error(1)
}