Documentation ¶
Overview ¶
Package fstests provides generic tests for testing the Fs and Object interfaces
Run go generate to write the tests for the remotes
Index ¶
- Variables
- func TestFinalise(t *testing.T)
- func TestFsCopy(t *testing.T)
- func TestFsDirChangeNotify(t *testing.T)
- func TestFsDirMove(t *testing.T)
- func TestFsIsFile(t *testing.T)
- func TestFsIsFileNotFound(t *testing.T)
- func TestFsListDirEmpty(t *testing.T)
- func TestFsListDirFile2(t *testing.T)
- func TestFsListDirRoot(t *testing.T)
- func TestFsListEmpty(t *testing.T)
- func TestFsListFile1(t *testing.T)
- func TestFsListFile1and2(t *testing.T)
- func TestFsListLevel2(t *testing.T)
- func TestFsListRDirEmpty(t *testing.T)
- func TestFsListRDirFile2(t *testing.T)
- func TestFsListRDirRoot(t *testing.T)
- func TestFsListRLevel2(t *testing.T)
- func TestFsListRSubdir(t *testing.T)
- func TestFsListSubdir(t *testing.T)
- func TestFsMkdir(t *testing.T)
- func TestFsMkdirRmdirSubdir(t *testing.T)
- func TestFsMove(t *testing.T)
- func TestFsName(t *testing.T)
- func TestFsNewObject(t *testing.T)
- func TestFsNewObjectDir(t *testing.T)
- func TestFsNewObjectNotFound(t *testing.T)
- func TestFsPrecision(t *testing.T)
- func TestFsPutError(t *testing.T)
- func TestFsPutFile1(t *testing.T)
- func TestFsPutFile2(t *testing.T)
- func TestFsPutStream(t *testing.T)
- func TestFsRmdirEmpty(t *testing.T)
- func TestFsRmdirFull(t *testing.T)
- func TestFsRmdirNotFound(t *testing.T)
- func TestFsRoot(t *testing.T)
- func TestFsString(t *testing.T)
- func TestFsUpdateFile1(t *testing.T)
- func TestInit(t *testing.T)
- func TestObjectFs(t *testing.T)
- func TestObjectHashes(t *testing.T)
- func TestObjectMimeType(t *testing.T)
- func TestObjectModTime(t *testing.T)
- func TestObjectOpen(t *testing.T)
- func TestObjectOpenSeek(t *testing.T)
- func TestObjectPartialRead(t *testing.T)
- func TestObjectPurge(t *testing.T)
- func TestObjectRemote(t *testing.T)
- func TestObjectRemove(t *testing.T)
- func TestObjectSetModTime(t *testing.T)
- func TestObjectSize(t *testing.T)
- func TestObjectStorable(t *testing.T)
- func TestObjectString(t *testing.T)
- func TestObjectUpdate(t *testing.T)
- type ExtraConfigItem
Constants ¶
This section is empty.
Variables ¶
var ( // RemoteName should be set to the name of the remote for testing RemoteName = "" // NilObject should be set to a nil Object from the Fs under test NilObject fs.Object // ExtraConfig is for adding config to a remote ExtraConfig = []ExtraConfigItem{} // SkipBadWindowsCharacters skips unusable characters for windows if set SkipBadWindowsCharacters = map[string]bool{} )
Functions ¶
func TestFsDirChangeNotify ¶
TestFsDirChangeNotify tests that changes to directories are properly propagated
go test -v -remote TestDrive: -run '^Test(Setup|Init|FsDirChangeNotify)$' -verbose
func TestFsDirMove ¶
TestFsDirMove tests DirMove
go test -v -run '^Test(Setup|Init|FsMkdir|FsPutFile1|FsPutFile2|FsUpdateFile1|FsDirMove)$
func TestFsIsFile ¶
TestFsIsFile tests that an error is returned along with a valid fs which points to the parent directory.
func TestFsIsFileNotFound ¶
TestFsIsFileNotFound tests that an error is not returned if no object is found
func TestFsListDirEmpty ¶
TestFsListDirEmpty tests listing the directories from an empty directory
func TestFsListDirFile2 ¶
TestFsListDirFile2 tests the files are correctly uploaded by doing Depth 1 directory listings
func TestFsListDirRoot ¶
TestFsListDirRoot tests that DirList works in the root
func TestFsListEmpty ¶
TestFsListEmpty tests listing an empty directory
func TestFsListFile1and2 ¶
TestFsListFile1and2 tests two files present
func TestFsListLevel2 ¶
TestFsListLevel2 tests List works for 2 levels
func TestFsListRDirEmpty ¶
TestFsListRDirEmpty tests listing the directories from an empty directory using ListR
func TestFsListRDirFile2 ¶
TestFsListRDirFile2 tests the files are correctly uploaded by doing Depth 1 directory listings using ListR
func TestFsListRDirRoot ¶
TestFsListRDirRoot tests that DirList works in the root using ListR
func TestFsListRLevel2 ¶
TestFsListRLevel2 tests List works for 2 levels using ListR
func TestFsListRSubdir ¶
TestFsListRSubdir tests List works for a subdirectory using ListR
func TestFsListSubdir ¶
TestFsListSubdir tests List works for a subdirectory
func TestFsMkdirRmdirSubdir ¶
TestFsMkdirRmdirSubdir tests making and removing a sub directory
func TestFsNewObjectDir ¶
TestFsNewObjectDir tests NewObject on a directory which should produce an error
func TestFsNewObjectNotFound ¶
TestFsNewObjectNotFound tests not finding a object
func TestFsPrecision ¶
TestFsPrecision tests the Precision of the Fs
func TestFsPutError ¶
TestFsPutError tests uploading a file where there is an error
It makes sure that aborting a file half way through does not create a file on the remote.
func TestFsPutFile2 ¶
TestFsPutFile2 tests putting a file into a subdirectory
func TestFsPutStream ¶
TestFsPutStream tests uploading files when size is not known in advance
func TestFsRmdirEmpty ¶
TestFsRmdirEmpty tests deleting an empty directory
func TestFsRmdirFull ¶
TestFsRmdirFull tests removing a non empty directory
func TestFsRmdirNotFound ¶
TestFsRmdirNotFound tests deleting a non existent directory
func TestFsUpdateFile1 ¶
TestFsUpdateFile1 tests updating file1 with new contents
func TestObjectHashes ¶
TestObjectHashes checks all the hashes the object supports
func TestObjectMimeType ¶
TestObjectMimeType tests the MimeType of the object is correct
func TestObjectModTime ¶
TestObjectModTime tests the ModTime of the object is correct
func TestObjectOpenSeek ¶
TestObjectOpenSeek tests that Open works with Seek
func TestObjectPartialRead ¶
TestObjectPartialRead tests that reading only part of the object does the correct thing
func TestObjectRemote ¶
TestObjectRemote tests the Remote is correct
func TestObjectSetModTime ¶
TestObjectSetModTime tests that SetModTime works
func TestObjectStorable ¶
TestObjectStorable tests that Storable works
func TestObjectString ¶
TestObjectString tests the Object String method
func TestObjectUpdate ¶
TestObjectUpdate tests that Update works
Types ¶
type ExtraConfigItem ¶
type ExtraConfigItem struct{ Name, Key, Value string }
ExtraConfigItem describes a config item added on the fly while testing