Test: oss.List

This commit is contained in:
HFO4 2020-04-29 09:18:26 +08:00
parent 52c2422be9
commit 305497e7cb
2 changed files with 21 additions and 1 deletions

2
assets

@ -1 +1 @@
Subproject commit 3b979faec127a4b7ab25dfe1138bf41582279a79
Subproject commit d752e266d52230b3334b88b22facd9f5d37eda9e

View file

@ -311,3 +311,23 @@ func TestDriver_Get(t *testing.T) {
asserts.Equal("123", string(content))
}
}
func TestDriver_List(t *testing.T) {
asserts := assert.New(t)
handler := Driver{
Policy: &model.Policy{
AccessKey: "ak",
SecretKey: "sk",
BucketName: "test",
Server: "test.com",
IsPrivate: true,
},
}
// 连接失败
{
res, err := handler.List(context.Background(), "/", true)
asserts.Error(err)
asserts.Empty(res)
}
}