Added test for the Conn method, changed azurite credentials to default

Signed-off-by: kosar <bogdan.kosarevskyi@gmail.com>
This commit is contained in:
kosar
2022-10-30 03:47:26 +03:00
parent 42106d8ab4
commit 43ac34f7f3
3 changed files with 66 additions and 5 deletions

View File

@@ -8,12 +8,12 @@ import (
func newStore() *Storage {
return New(Config{
Account: "azurite",
Account: "devstoreaccount1",
Container: "test",
Endpoint: "http://127.0.0.1:10000/azurite",
Endpoint: "http://127.0.0.1:10000/devstoreaccount1",
Credentials: Credentials{
Account: "azurite",
Key: "YXp1cml0ZWtleQo=",
Account: "devstoreaccount1",
Key: "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==",
},
})
}
@@ -126,6 +126,11 @@ func Test_AzureBlob_Reset(t *testing.T) {
utils.AssertEqual(t, true, len(result) == 0)
}
func Test_S3_Conn(t *testing.T) {
testStore := newStore()
utils.AssertEqual(t, true, testStore.Conn() != nil)
}
func Test_AzureBlob_Close(t *testing.T) {
testStore := newStore()
utils.AssertEqual(t, nil, testStore.Close())