e2etests

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunCommandOnServer

func RunCommandOnServer(privKey string, server *hcloud.Server, command string) error

func WaitForHTTPAvailable

func WaitForHTTPAvailable(t *testing.T, ingressIP string, useHTTPS bool)

WaitForHTTPAvailable tries to connect to the given IP via http It tries it for 2 minutes, if after two minutes the connection wasn't successful and it wasn't a HTTP 200 response it will fail

func WaitForHTTPOnServer

func WaitForHTTPOnServer(t *testing.T, srv *hcloud.Server, privateKey, tgtIP string, useHTTPS bool)

WaitForHTTPOnServer tries to connect to the given IP using curl.

It tries it for 2 minutes, if after two minutes the connection wasn't successful or it was not a HTTP 200 response it will fail

func WithSSHSession

func WithSSHSession(privKey string, host string, fn func(*ssh.Session) error) error

Types

type K8sDistribution

type K8sDistribution string
const (
	K8sDistributionK8s K8sDistribution = "k8s"
	K8sDistributionK3s K8sDistribution = "k3s"
)

type TestCluster

type TestCluster struct {
	KeepOnFailure bool
	// contains filtered or unexported fields
}

func (*TestCluster) CreateTLSCertificate

func (tc *TestCluster) CreateTLSCertificate(t *testing.T, baseName string) *hcloud.Certificate

CreateTLSCertificate creates a TLS certificate used for testing and posts it to the Hetzner Cloud backend.

The baseName of the certificate gets a random number suffix attached. baseName and suffix are separated by a single "-" character.

func (*TestCluster) Start

func (tc *TestCluster) Start() error

func (*TestCluster) Stop

func (tc *TestCluster) Stop(testFailed bool) error

Jump to

Keyboard shortcuts

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