Test: oss.List
This commit is contained in:
parent
52c2422be9
commit
305497e7cb
2 changed files with 21 additions and 1 deletions
2
assets
2
assets
|
@ -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…
Reference in a new issue