Test: oss driver

This commit is contained in:
HFO4
2020-01-17 13:04:14 +08:00
parent 83a17645a1
commit 3da87ba7cf
12 changed files with 348 additions and 71 deletions

View File

@@ -173,6 +173,12 @@ func TestPolicy_GetUploadURL(t *testing.T) {
asserts.Equal("http://127.0.0.1/api/v3/slave/upload", policy.GetUploadURL())
}
// OSS
{
policy := Policy{Type: "oss", BaseURL: "base", Server: "http://127.0.0.1"}
asserts.Equal("base", policy.GetUploadURL())
}
// 未知
{
policy := Policy{Type: "unknown", Server: "http://127.0.0.1"}