testing: retry around B2 test
"time"
"github.com/kopia/kopia/internal/blobtesting"
+ "github.com/kopia/kopia/internal/testutil"
"github.com/kopia/kopia/repo/blob"
"github.com/kopia/kopia/repo/blob/b2"
)
@@ -33,6 +34,7 @@ func TestB2Storage(t *testing.T) {
bucket := getEnvOrSkip(t, testBucketEnv)
keyID := getEnvOrSkip(t, testKeyIDEnv)
key := getEnvOrSkip(t, testKeyEnv)
+ testutil.Retry(t, func(t *testutil.RetriableT) {
data := make([]byte, 8)
rand.Read(data) //nolint:errcheck
@@ -68,6 +70,7 @@ func TestB2Storage(t *testing.T) {
if err := st.Close(ctx); err != nil {
t.Fatalf("err: %v", err)
}
+ })
}
func TestB2StorageInvalidBlob(t *testing.T) {
