test

package
v1.5.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Dir      = "logdir"
	MetaDir  = "./meta"
	Files    = []string{"f3", "f2", "f1"}
	Contents = []string{"223456789", "123456789", "123456789"}
	Appends  = []string{"11111", "22222", "33333"}
)

Functions

func AppendFiles added in v1.5.4

func AppendFiles(interval int)

Append files append dummy files with dummy content. It delays given interval in milliseconds between creation of each file. It does not create missing parent directories and will return error if any parent directory does not exist.

func CreateDir

func CreateDir()

CreateDir creates a new directory with default permission. It does not create missing parent directories and will return error if any parent directory does not exist.

func CreateFile

func CreateFile(fileName string, content string)

CreateFile creates an empty file in given path.

func CreateFileForTest added in v1.5.4

func CreateFileForTest(interval int)

func CreateFiles

func CreateFiles(interval int)

CreateFiles creates dummy files with dummy content. It delays given interval in milliseconds between creation of each file. It does not create missing parent directories and will return error if any parent directory does not exist.

func CreateSeqFile added in v1.5.4

func CreateSeqFile(interval int, lines string)

func DeleteFile

func DeleteFile(fpath string)

DeleteFile removes file with given path.

func DestroyDir

func DestroyDir()

DestroyDir removes all directories that are created during testing.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL