Add: GetIntSetting helper

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

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)
}
}