Documentation
¶
Index ¶
- func CheckDeployments(deployments []string) error
- func FindStringInCmdAsync(scanner *bufio.Scanner, target string) bool
- func IsExistingServer() bool
- func IsRoot() bool
- func ParseNodes() ([]corev1.Node, error)
- func ParsePods(opts metav1.ListOptions) ([]corev1.Pod, error)
- func RunCommand(cmd string) (string, error)
- func ServerArgsPresent(neededArgs []string) bool
- func TStacCleanup(k3sTestLock int, dataDir string) error
- func TStacCmd(inputArgs ...string) (string, error)
- func TStacDefaultDeployments() error
- func TStacDumpLog(server *TStacServer) error
- func TStacKillServer(server *TStacServer) error
- func TStacServerArgs() []string
- func TStacTestLock() (int, error)
- type TStacServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDeployments ¶
CheckDeployments checks if the provided list of deployments are ready, otherwise returns an error
func IsExistingServer ¶
func IsExistingServer() bool
func ParseNodes ¶
func ServerArgsPresent ¶
ServerArgsPresent checks if the given arguments are found in the running k3s server
func TStacCleanup ¶
TStacCleanup unlocks the test-lock and attempts to cleanup networking and files leftover from an integration test. This is similar to the k3s-killall.sh script, but we dynamically generate that on install, so we don't have access to it during testing.
func TStacCmd ¶
TStacCmd launches the provided TStac command via exec. Command blocks until finished. Command output from both Stderr and Stdout is provided via string. Input can be a single string with space separated args, or multiple string args cmdEx1, err := TStacCmd("etcd-snapshot", "ls") cmdEx2, err := TStacCmd("kubectl get pods -A") cmdEx2, err := TStacCmd("kubectl", "get", "pods", "-A")
func TStacDefaultDeployments ¶
func TStacDefaultDeployments() error
TStacDefaultDeployments checks if the default deployments for TStac are ready, otherwise returns an error
func TStacDumpLog ¶
func TStacDumpLog(server *TStacServer) error
func TStacKillServer ¶
func TStacKillServer(server *TStacServer) error
TStacKillServer terminates the running TStac server and its children
func TStacServerArgs ¶
func TStacServerArgs() []string
TStacServerArgs returns the list of arguments that the k3s server launched with
func TStacTestLock ¶
Types ¶
type TStacServer ¶
type TStacServer struct {
// contains filtered or unexported fields
}
func TStacStartServer ¶
func TStacStartServer(inputArgs ...string) (*TStacServer, error)
TStacStartServer acquires an exclusive lock on a temporary file, then launches a k3s cluster with the provided arguments. Subsequent/parallel calls to this function will block until the original lock is cleared using TStacKillServer