Fix: untracked files

This commit is contained in:
HFO4
2019-12-28 15:50:56 +08:00
parent 132c7a8fcb
commit 2b8921e9fd
17 changed files with 623 additions and 42 deletions

View File

@@ -160,3 +160,9 @@ func (handler Handler) Source(
finalURL := baseURL.ResolveReference(signedURI).String()
return finalURL, nil
}
// Token 获取上传策略和认证Token本地策略直接返回空值
// TODO 测试
func (handler Handler) Token(ctx context.Context, ttl int64, key string) (serializer.UploadCredential, error) {
return serializer.UploadCredential{}, nil
}

View File

@@ -184,3 +184,11 @@ func TestHandler_GetDownloadURL(t *testing.T) {
asserts.Empty(downloadURL)
}
}
func TestHandler_Token(t *testing.T) {
asserts := assert.New(t)
handler := Handler{}
ctx := context.Background()
_, err := handler.Token(ctx, 10, "123")
asserts.NoError(err)
}