提交 305497e7 编写于 作者: H HFO4

Test: oss.List

上级 52c2422b
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)
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册