mirror of
https://github.com/gofiber/storage.git
synced 2025-10-06 00:57:38 +08:00
chore(s3): use require in tests, running a container per test function
This commit is contained in:
@@ -11,6 +11,9 @@ import (
|
||||
func Test_S3_CreateDeleteBucket(t *testing.T) {
|
||||
bkt := "test-new-bucket"
|
||||
|
||||
testStore := newTestStore(t)
|
||||
defer testStore.Close()
|
||||
|
||||
err := testStore.CreateBucket(bkt)
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -21,6 +24,9 @@ func Test_S3_CreateDeleteBucket(t *testing.T) {
|
||||
func Test_S3_DeleteMany(t *testing.T) {
|
||||
val := []byte("doe")
|
||||
|
||||
testStore := newTestStore(t)
|
||||
defer testStore.Close()
|
||||
|
||||
err := testStore.Set("john1", val, 0)
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -61,6 +67,9 @@ func Test_S3_SetWithChecksum(t *testing.T) {
|
||||
types.ChecksumAlgorithmSha256: sha256sum,
|
||||
}
|
||||
|
||||
testStore := newTestStore(t)
|
||||
defer testStore.Close()
|
||||
|
||||
err := testStore.SetWithChecksum(key, val, checksum)
|
||||
require.NoError(t, err)
|
||||
|
||||
|
Reference in New Issue
Block a user