e2e

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package e2e implements end to end testing of BYOH clusters.

Index

Constants

View Source
const (
	// DefaultFileMode the default file mode of files created for tests
	DefaultFileMode fs.FileMode = 0777
	// ReadByohControllerManagerLogShellFile location of script to read the controller manager log
	ReadByohControllerManagerLogShellFile string = "/tmp/read-byoh-controller-manager-log.sh"
	// ReadAllPodsShellFile location of script to read all pods logs
	ReadAllPodsShellFile string = "/tmp/read-all-pods.sh"
)
View Source
const (
	TempKubeconfigPath = "/tmp/mgmt.conf"
)

Variables

This section is empty.

Functions

func ExecuteShellScript

func ExecuteShellScript(shellFileName string)

ExecuteShellScript executes a given shell script file location

func ShowFileContent

func ShowFileContent(fileName string)

ShowFileContent prints to stdout the content of the given file

func ShowInfo

func ShowInfo(allAgentLogFiles []string)

ShowInfo shows all the pods status, agent logs, and controller manager logs

func Showf

func Showf(format string, a ...interface{})

Showf prints formatted string to stdout

func WriteDockerLog

func WriteDockerLog(output types.HijackedResponse, outputFile string) *os.File

WriteDockerLog redirects the docker logs to the given file

func WriteShellScript

func WriteShellScript(shellFileName string, shellFileContent []string)

WriteShellScript writes shell script contents/commands to the given file location

Types

type ByoHostRunner added in v0.1.1

type ByoHostRunner struct {
	Context context.Context

	ByoHostName           string
	PathToHostAgentBinary string
	Namespace             string
	DockerClient          *client.Client
	NetworkInterface      string

	CommandArgs             map[string]string
	Port                    string
	KubeconfigFile          string
	BootstrapKubeconfigData string
	// contains filtered or unexported fields
}

ByoHostRunner runs bring-you-own-host cluster in docker

func (*ByoHostRunner) ExecByoDockerHost added in v0.1.1

func (r *ByoHostRunner) ExecByoDockerHost(byohost *container.CreateResponse) (types.HijackedResponse, string, error)

ExecByoDockerHost runs the exec command in the byohost docker container

func (*ByoHostRunner) SetupByoDockerHost added in v0.1.1

func (r *ByoHostRunner) SetupByoDockerHost() (*container.CreateResponse, error)

SetupByoDockerHost sets up the byohost docker container

Jump to

Keyboard shortcuts

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