"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
test_all: make a way of ignoring integration test failures
Nick Craig-Woodf29757de3b43
diff --git a/fstest/test_all/config.go b/fstest/test_all/config.goindex 5bacc65c7..06c9666b0 100644--- a/fstest/test_all/config.go+++ b/fstest/test_all/config.go@@ -28,11 +28,12 @@ type Test struct {//// FIXME make bucket based remotes set sub-dir automatically???type Backend struct {- Backend string // name of the backend directory- Remote string // name of the test remote- SubDir bool // set to test with -sub-dir- FastList bool // set to test with -fast-list- OneOnly bool // set to run only one backend test at once+ Backend string // name of the backend directory+ Remote string // name of the test remote+ SubDir bool // set to test with -sub-dir+ FastList bool // set to test with -fast-list+ OneOnly bool // set to run only one backend test at once+ Ignore []string // test names to ignore the failure of}// MakeRuns creates Run objects the Backend and Test@@ -48,6 +49,10 @@ func (b *Backend) MakeRuns(t *Test) (runs []*Run) {if b.FastList && t.FastList {fastlists = append(fastlists, true)}+ ignore := make(map[string]struct{}, len(b.Ignore))+ for _, item := range b.Ignore {+ ignore[item] = struct{}{}+ }for _, subdir := range subdirs {for _, fastlist := range fastlists {run := &Run{@@ -59,6 +64,7 @@ func (b *Backend) MakeRuns(t *Test) (runs []*Run) {NoRetries: t.NoRetries,OneOnly: b.OneOnly,NoBinary: t.NoBinary,+ Ignore: ignore,}if t.AddBackend {run.Path = path.Join(run.Path, b.Backend)diff --git a/fstest/test_all/config.yaml b/fstest/test_all/config.yamlindex cbdc1a340..819151863 100644--- a/fstest/test_all/config.yaml+++ b/fstest/test_all/config.yaml@@ -65,10 +65,14 @@ backends:remote: "TestS3DigitalOcean:"subdir: truefastlist: true+ ignore:+ - TestIntegration/FsMkdir/FsPutFiles/FsCopy- backend: "s3"remote: "TestS3Ceph:"subdir: truefastlist: true+ ignore:+ - TestIntegration/FsMkdir/FsPutFiles/FsCopy- backend: "sftp"remote: "TestSftp:"subdir: false@@ -81,6 +85,8 @@ backends:remote: "TestSwiftCeph:"subdir: truefastlist: true+ ignore:+ - TestIntegration/FsMkdir/FsPutFiles/FsCopy- backend: "yandex"remote: "TestYandex:"subdir: false@@ -118,6 +124,8 @@ backends:remote: "TestMega:"subdir: falsefastlist: false+ ignore:+ - TestIntegration/FsMkdir/FsPutFiles/PublicLink- backend: "opendrive"remote: "TestOpenDrive:"subdir: falsediff --git a/fstest/test_all/run.go b/fstest/test_all/run.goindex be787d5a1..b9f1eac8b 100644--- a/fstest/test_all/run.go+++ b/fstest/test_all/run.go@@ -45,6 +45,7 @@ type Run struct {NoRetries bool // don't retry if setOneOnly bool // only run test for this backend at onceNoBinary bool // set to not build a binary+ Ignore map[string]struct{}// InternalscmdLine []stringcmdString string@@ -138,9 +139,15 @@ func (r *Run) findFailures() {oldFailedTests := r.failedTestsr.failedTests = nilexcludeParents := map[string]struct{}{}+ ignored := 0for _, matches := range failRe.FindAllSubmatch(r.output, -1) {failedTest := string(matches[1])- r.failedTests = append(r.failedTests, failedTest)+ // Skip any ignored failures+ if _, found := r.Ignore[failedTest]; found {+ ignored+++ } else {+ r.failedTests = append(r.failedTests, failedTest)+ }// Find all the parents of this testparts := strings.Split(failedTest, "/")for i := len(parts) - 1; i >= 1; i-- {@@ -155,6 +162,12 @@ func (r *Run) findFailures() {}}r.failedTests = newTests+ if len(r.failedTests) == 0 && ignored > 0 {+ log.Printf("%q - Found %d ignored errors only - marking as good", r.cmdString, ignored)+ r.err = nil+ r.dumpOutput()+ return+ }if len(r.failedTests) != 0 {r.runFlag = testsToRegexp(r.failedTests)} else {