Test: oss.List

pull/348/head
HFO4 5 years ago
parent 52c2422be9
commit 305497e7cb

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

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

Loading…
Cancel
Save