v0.0.0-...-c5655c4 Latest Latest

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

Go to latest
Published: Jan 4, 2017 License: Apache-2.0 Imports: 14 Imported by: 0




View Source
const DownloadResp string = "Downloading is not yet allowed."

DownloadResp expected reply from server when downloading

View Source
const TestRootDir string = ",scratch"

TestRootDir defines the root directory used by tests to write temporary test data

View Source
const TokDownloadResp string = "Token downloading is not yet allowed."

TokDownloadResp expected reply from server when downloading token.

View Source
const TokUploadResp string = "Token uploading is not yet allowed."

TokUploadResp expected reply from server when uploading token.


This section is empty.


func CompareTree

func CompareTree(rootA string, rootB string) error

CompareTree does deep compare the two paths rootA & rootB and returns true if they match else returns false.

func GetAndMatch

func GetAndMatch(url string, expOut string) (bool, error)

GetAndMatch is a function for testing. It fetches the url and compares response against expected output.

func GetFreePort

func GetFreePort() (string, error)

GetFreePort gest an unused port on localhost and returns it as string with a preceding colon. For example - ":8080"

func MainTestEntry

func MainTestEntry(m *testing.M)

MainTestEntry is the main test function that gets called. it performs setup, runs tests, and if they passed, performs the teardown.

func RunningAsRoot

func RunningAsRoot() bool

RunningAsRoot returns true if it is running as a super user

func SetupTest

func SetupTest() error

SetupTest is the first function Go test framework calls when testing the 'datalayer' package. we do setup here.

func ShutdownTest

func ShutdownTest()

ShutdownTest cleans up after running the tests

func Tar

func Tar(src string, destFile string) error

Tar takes the src directory or file and generates destFile that is tar'ed & gzip'ed

func Untar

func Untar(srcFile string, destDir string) error

Untar takes the srcFile that is a tar'ed & gzip'ed file and expands in inside the destDir


This section is empty.

Jump to

Keyboard shortcuts

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