mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-28 10:51:57 +08:00
Test: oss.List
This commit is contained in:
2
assets
2
assets
Submodule assets updated: 3b979faec1...d752e266d5
@@ -311,3 +311,23 @@ func TestDriver_Get(t *testing.T) {
|
|||||||
asserts.Equal("123", string(content))
|
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