tests

package
v0.0.0-...-19d3250 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeDirAndAssert

func ChangeDirAndAssert(t *testing.T, dirPath string)

func ChangeDirWithCallback

func ChangeDirWithCallback(t *testing.T, wd, dirPath string) func()

ChangeDirWithCallback changes working directory to the given path and return function that change working directory back to the original path.

func ExcludeTestsPackage

func ExcludeTestsPackage(packages []string, packageToExclude string) []string

func GetLocalArtifactoryTokenIfNeeded

func GetLocalArtifactoryTokenIfNeeded(url string) (adminToken string)

func GetTestPackages

func GetTestPackages(searchPattern string) []string

func InitVcsSubmoduleTestDir

func InitVcsSubmoduleTestDir(t *testing.T, srcPath, tmpDir string) (submodulePath string)

func InitVcsWorktreeTestDir

func InitVcsWorktreeTestDir(t *testing.T, srcPath, tmpDir string) (worktreePath string)

func RemoveAllAndAssert

func RemoveAllAndAssert(t *testing.T, path string)

func RemoveAndAssert

func RemoveAndAssert(t *testing.T, path string)

func RunTests

func RunTests(testsPackages []string, hideUnitTestsLog bool) error

func SetEnvAndAssert

func SetEnvAndAssert(t *testing.T, key, value string)

func SetEnvWithCallbackAndAssert

func SetEnvWithCallbackAndAssert(t *testing.T, key, value string) func()

func StartHttpServer

func StartHttpServer(handlers HttpServerHandlers) (int, error)

func UnSetEnvAndAssert

func UnSetEnvAndAssert(t *testing.T, key string)

Types

type HttpServerHandlers

type HttpServerHandlers map[string]func(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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