github.com/10XDev/rclone@v1.52.3-0.20200626220027-16af9ab76b2a/backend/b2/b2_test.go (about)

     1  // Test B2 filesystem interface
     2  package b2
     3  
     4  import (
     5  	"testing"
     6  
     7  	"github.com/rclone/rclone/fs"
     8  	"github.com/rclone/rclone/fstest/fstests"
     9  )
    10  
    11  // TestIntegration runs integration tests against the remote
    12  func TestIntegration(t *testing.T) {
    13  	fstests.Run(t, &fstests.Opt{
    14  		RemoteName: "TestB2:",
    15  		NilObject:  (*Object)(nil),
    16  		ChunkedUpload: fstests.ChunkedUploadConfig{
    17  			MinChunkSize:       minChunkSize,
    18  			NeedMultipleChunks: true,
    19  		},
    20  	})
    21  }
    22  
    23  func (f *Fs) SetUploadChunkSize(cs fs.SizeSuffix) (fs.SizeSuffix, error) {
    24  	return f.setUploadChunkSize(cs)
    25  }
    26  
    27  func (f *Fs) SetUploadCutoff(cs fs.SizeSuffix) (fs.SizeSuffix, error) {
    28  	return f.setUploadCutoff(cs)
    29  }
    30  
    31  var (
    32  	_ fstests.SetUploadChunkSizer = (*Fs)(nil)
    33  	_ fstests.SetUploadCutoffer   = (*Fs)(nil)
    34  )