chore(s3): use require in tests, running a container per test function

This commit is contained in:
Manuel de la Peña
2025-04-15 16:54:45 +02:00
parent a875f39f69
commit 827ef9ec96
3 changed files with 47 additions and 12 deletions

View File

@@ -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)