Add: GetIntSetting helper

This commit is contained in:
HFO4 committed 2020-01-02 12:44:53 +08:00
1 parent fffcf1aa1b
commit a75be3a927
11 files changed
+59 -110

No files matched your search

-22
View File
@@ -199,26 +199,4 @@ func TestFileSystem_GetUploadToken(t *testing.T) {
testHandller.AssertExpectations(t)
asserts.Error(err)
}
// 上传有效期错误
{
cache.SetSettings(map[string]string{
"upload_credential_timeout": "?10",
"upload_session_timeout": "10",
}, "setting_")
_, err := fs.GetUploadToken(ctx, "/", 10)
asserts.Error(err)
}
// 上传会话有效期错误
{
cache.SetSettings(map[string]string{
"upload_credential_timeout": "10",
"upload_session_timeout": "?10",
}, "setting_")
_, err := fs.GetUploadToken(ctx, "/", 10)
asserts.Error(err)
}
}