Fix: storage policy should be re-dispatched according to policy id in upload session

This commit is contained in:
HFO4
2020-01-17 14:35:21 +08:00
parent b862ddb666
commit 68d4a86166
8 changed files with 22 additions and 45 deletions

View File

@@ -64,13 +64,13 @@ func TestDispatchHandler(t *testing.T) {
}
// 未指定,使用用户默认
err := fs.dispatchHandler()
err := fs.DispatchHandler()
asserts.NoError(err)
asserts.IsType(local.Driver{}, fs.Handler)
// 已指定,发生错误
fs.Policy = &model.Policy{Type: "unknown"}
err = fs.dispatchHandler()
err = fs.DispatchHandler()
asserts.Error(err)
}