Documentation
¶
Index ¶
- Constants
- func CompareTree(rootA string, rootB string) error
- func GetAndMatch(url string, expOut string) (bool, error)
- func GetFreePort() (string, error)
- func MainTestEntry(m *testing.M)
- func RunningAsRoot() bool
- func SetupTest() error
- func ShutdownTest()
- func Tar(src string, destFile string) error
- func Untar(srcFile string, destDir string) error
Constants ¶
const DownloadResp string = "Downloading is not yet allowed."
DownloadResp expected reply from server when downloading
const TestRootDir string = ",scratch"
TestRootDir defines the root directory used by tests to write temporary test data
const TokDownloadResp string = "Token downloading is not yet allowed."
TokDownloadResp expected reply from server when downloading token.
const TokUploadResp string = "Token uploading is not yet allowed."
TokUploadResp expected reply from server when uploading token.
Variables ¶
This section is empty.
Functions ¶
func CompareTree ¶
CompareTree does deep compare the two paths rootA & rootB and returns true if they match else returns false.
func GetAndMatch ¶
GetAndMatch is a function for testing. It fetches the url and compares response against expected output.
func GetFreePort ¶
GetFreePort gest an unused port on localhost and returns it as string with a preceding colon. For example - ":8080"
func MainTestEntry ¶
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.
Types ¶
This section is empty.