Fix: failed test due to relative path

This commit is contained in:
HFO4
2020-03-12 09:30:57 +08:00
parent 37de715541
commit 71876a79cd
5 changed files with 15 additions and 14 deletions

View File

@@ -192,7 +192,7 @@ func TestHandler_Source(t *testing.T) {
func TestHandler_GetDownloadURL(t *testing.T) {
asserts := assert.New(t)
handler := Driver{}
handler := Driver{Policy: &model.Policy{}}
ctx := context.Background()
auth.General = auth.HMACAuth{SecretKey: []byte("test")}

View File

@@ -52,7 +52,9 @@ func TestDriver_CORS(t *testing.T) {
// 失败
{
asserts.Error(handler.CORS())
asserts.NotPanics(func() {
handler.CORS()
})
}
}