mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Test: oss.List
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user