rclone: github.com/ncw/rclone/vfs/vfstest Index | Files

package vfstest

import "github.com/ncw/rclone/vfs/vfstest"

Index

Package Files

dir.go edge_cases.go file.go fs.go os.go read.go read_unix.go vfs.go write.go write_unix.go

func FIXMETestWriteOpenFileInDirListing Uses

func FIXMETestWriteOpenFileInDirListing(t *testing.T)

FIXMETestWriteOpenFileInDirListing tests open file in directory listing

func RunTests Uses

func RunTests(t *testing.T, useVFS bool, fn mountlib.MountFn)

RunTests runs all the tests against all the VFS cache modes

If useVFS is set then it runs the tests against a VFS rather than amount

func TestDirCacheFlush Uses

func TestDirCacheFlush(t *testing.T)

TestDirCacheFlush tests fluching the dir cache

func TestDirCacheFlushOnDirRename Uses

func TestDirCacheFlushOnDirRename(t *testing.T)

TestDirCacheFlushOnDirRename tests flushing the dir cache on rename

func TestDirCreateAndRemoveDir Uses

func TestDirCreateAndRemoveDir(t *testing.T)

TestDirCreateAndRemoveDir tests creating and removing a directory

func TestDirCreateAndRemoveFile Uses

func TestDirCreateAndRemoveFile(t *testing.T)

TestDirCreateAndRemoveFile tests creating and removing a file

func TestDirLs Uses

func TestDirLs(t *testing.T)

TestDirLs checks out listing

func TestDirModTime Uses

func TestDirModTime(t *testing.T)

TestDirModTime tests mod times

func TestDirRenameEmptyDir Uses

func TestDirRenameEmptyDir(t *testing.T)

TestDirRenameEmptyDir tests renaming and empty directory

func TestDirRenameFile Uses

func TestDirRenameFile(t *testing.T)

TestDirRenameFile tests renaming a file

func TestDirRenameFullDir Uses

func TestDirRenameFullDir(t *testing.T)

TestDirRenameFullDir tests renaming a full directory

func TestFileModTime Uses

func TestFileModTime(t *testing.T)

TestFileModTime tests mod times on files

func TestFileModTimeWithOpenWriters Uses

func TestFileModTimeWithOpenWriters(t *testing.T)

TestFileModTimeWithOpenWriters tests mod time on open files

func TestMount Uses

func TestMount(t *testing.T)

TestMount checks that the Fs is mounted by seeing if the mountpoint is in the mount output

func TestReadByByte Uses

func TestReadByByte(t *testing.T)

TestReadByByte reads by byte including don't read any bytes

func TestReadChecksum Uses

func TestReadChecksum(t *testing.T)

TestReadChecksum checks the checksum reading is working

func TestReadFileDoubleClose Uses

func TestReadFileDoubleClose(t *testing.T)

TestReadFileDoubleClose tests double close on read

func TestReadSeek Uses

func TestReadSeek(t *testing.T)

TestReadSeek test seeking

func TestRenameOpenHandle Uses

func TestRenameOpenHandle(t *testing.T)

TestRenameOpenHandle checks that a file with open writers is successfully renamed after all writers close. See https://github.com/rclone/rclone/issues/2130

func TestRoot Uses

func TestRoot(t *testing.T)

TestRoot checks root directory is present and correct

func TestTouchAndDelete Uses

func TestTouchAndDelete(t *testing.T)

TestTouchAndDelete checks that writing a zero byte file and immediately deleting it is not racy. See https://github.com/rclone/rclone/issues/1181

func TestWriteFileAppend Uses

func TestWriteFileAppend(t *testing.T)

TestWriteFileAppend tests that O_APPEND works on cache backends >= writes

func TestWriteFileDoubleClose Uses

func TestWriteFileDoubleClose(t *testing.T)

TestWriteFileDoubleClose tests double close on write

func TestWriteFileDup Uses

func TestWriteFileDup(t *testing.T)

TestWriteFileDup tests behavior of mmap() in Python by using dup() on a file handle

func TestWriteFileFsync Uses

func TestWriteFileFsync(t *testing.T)

TestWriteFileFsync tests Fsync

NB the code for this is in file.go rather than write.go

func TestWriteFileNoWrite Uses

func TestWriteFileNoWrite(t *testing.T)

TestWriteFileNoWrite tests writing a file with no write()'s to it

func TestWriteFileOverwrite Uses

func TestWriteFileOverwrite(t *testing.T)

TestWriteFileOverwrite tests overwriting a file

func TestWriteFileWrite Uses

func TestWriteFileWrite(t *testing.T)

TestWriteFileWrite tests writing a file and reading it back

type Oser Uses

type Oser interface {
    Chtimes(name string, atime time.Time, mtime time.Time) error
    Create(name string) (vfs.Handle, error)
    Mkdir(name string, perm os.FileMode) error
    Open(name string) (vfs.Handle, error)
    OpenFile(name string, flags int, perm os.FileMode) (fd vfs.Handle, err error)
    ReadDir(dirname string) ([]os.FileInfo, error)
    ReadFile(filename string) (b []byte, err error)
    Remove(name string) error
    Rename(oldName, newName string) error
    Stat(path string) (os.FileInfo, error)
}

Oser defines the things that the "os" package can do

This covers what the VFS can do also

type Run Uses

type Run struct {
    // contains filtered or unexported fields
}

Run holds the remotes for a test run

func (*Run) Finalise Uses

func (r *Run) Finalise()

Finalise cleans the remote and unmounts

Package vfstest imports 28 packages (graph). Updated 2020-08-05. Refresh now. Tools for package owners.