github.com/rclone/rclone@v1.66.1-0.20240517100346-7b89735ae726/backend/onedrive/onedrive_test.go (about)

     1  // Test OneDrive filesystem interface
     2  package onedrive
     3  
     4  import (
     5  	"testing"
     6  
     7  	"github.com/rclone/rclone/fs"
     8  	"github.com/rclone/rclone/fstest"
     9  	"github.com/rclone/rclone/fstest/fstests"
    10  )
    11  
    12  // TestIntegration runs integration tests against the remote
    13  func TestIntegration(t *testing.T) {
    14  	fstests.Run(t, &fstests.Opt{
    15  		RemoteName: "TestOneDrive:",
    16  		NilObject:  (*Object)(nil),
    17  		ChunkedUpload: fstests.ChunkedUploadConfig{
    18  			CeilChunkSize: fstests.NextMultipleOf(chunkSizeMultiple),
    19  		},
    20  	})
    21  }
    22  
    23  // TestIntegrationCn runs integration tests against the remote
    24  func TestIntegrationCn(t *testing.T) {
    25  	if *fstest.RemoteName != "" {
    26  		t.Skip("skipping as -remote is set")
    27  	}
    28  	fstests.Run(t, &fstests.Opt{
    29  		RemoteName: "TestOneDriveCn:",
    30  		NilObject:  (*Object)(nil),
    31  		ChunkedUpload: fstests.ChunkedUploadConfig{
    32  			CeilChunkSize: fstests.NextMultipleOf(chunkSizeMultiple),
    33  		},
    34  	})
    35  }
    36  
    37  func (f *Fs) SetUploadChunkSize(cs fs.SizeSuffix) (fs.SizeSuffix, error) {
    38  	return f.setUploadChunkSize(cs)
    39  }
    40  
    41  var _ fstests.SetUploadChunkSizer = (*Fs)(nil)