mirror of
https://github.com/kopia/kopia.git
synced 2026-05-14 01:37:07 -04:00
Added improved providervalidation logic which tests for read-after-write property between connections. The new test was failing before the change and is now passing for Google Drive, OneDrive and DropBox.
26 lines
648 B
Go
26 lines
648 B
Go
package providervalidation_test
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
"github.com/kopia/kopia/internal/blobtesting"
|
|
"github.com/kopia/kopia/internal/providervalidation"
|
|
"github.com/kopia/kopia/internal/testlogging"
|
|
"github.com/kopia/kopia/repo/blob/filesystem"
|
|
)
|
|
|
|
func TestProviderValidation(t *testing.T) {
|
|
ctx := testlogging.Context(t)
|
|
st, err := filesystem.New(ctx, &filesystem.Options{
|
|
Path: t.TempDir(),
|
|
}, false)
|
|
require.NoError(t, err)
|
|
|
|
opt := blobtesting.TestValidationOptions
|
|
opt.ConcurrencyTestDuration = 3 * time.Second
|
|
require.NoError(t, providervalidation.ValidateProvider(ctx, st, opt))
|
|
}
|