Documentation ¶
Overview ¶
Package fstest provides utilities for testing the Fs
Index ¶
- func CheckListing(t *testing.T, f fs.Fs, items []Item)
- func CheckListingWithPrecision(t *testing.T, f fs.Fs, items []Item, precision time.Duration)
- func CheckTimeEqualWithPrecision(t0, t1 time.Time, precision time.Duration) (time.Duration, bool)
- func LocalRemote() (path string, err error)
- func RandomRemote(remoteName string, subdir bool) (fs.Fs, func(), error)
- func RandomRemoteName(remoteName string) (string, string, error)
- func RandomString(n int) string
- func TestMkdir(t *testing.T, remote fs.Fs)
- func TestPurge(t *testing.T, remote fs.Fs)
- func TestRmdir(t *testing.T, remote fs.Fs)
- func Time(timeString string) time.Time
- type Item
- type Items
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckListing ¶
CheckListing checks the fs to see if it has the expected contents
func CheckListingWithPrecision ¶
CheckListingWithPrecision checks the fs to see if it has the expected contents with the given precision.
func CheckTimeEqualWithPrecision ¶
CheckTimeEqualWithPrecision checks the times are equal within the precision, returns the delta and a flag
func LocalRemote ¶
LocalRemote creates a temporary directory name for local remotes
func RandomRemote ¶
RandomRemote makes a random bucket or subdirectory on the remote
Call the finalise function returned to Purge the fs at the end (and the parent if necessary)
func RandomRemoteName ¶
RandomRemoteName makes a random bucket or subdirectory name
Returns a random remote name plus the leaf name
func RandomString ¶
RandomString create a random string for test purposes
Types ¶
type Item ¶
Item represents an item for checking