Modify: use path package in app level

This commit is contained in:
HFO4
2020-01-04 16:21:43 +08:00
parent d94896041e
commit c23d129dbb
5 changed files with 27 additions and 15 deletions

View File

@@ -29,6 +29,7 @@ func TestHandler_Token(t *testing.T) {
OptionsSerialized: model.PolicyOption{
FileType: []string{"txt"},
},
Server: "http://test.com",
},
AuthInstance: auth.HMACAuth{},
}
@@ -42,6 +43,7 @@ func TestHandler_Token(t *testing.T) {
asserts.NoError(err)
policy, err := serializer.DecodeUploadPolicy(credential.Policy)
asserts.NoError(err)
asserts.Equal("http://test.com/api/v3/callback/remote/123", policy.CallbackURL)
asserts.Equal(uint64(10), policy.MaxSize)
asserts.Equal(true, policy.AutoRename)
asserts.Equal("dir", policy.SavePath)