e2etests

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: Apache-2.0 Imports: 30 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 added in v1.9.0

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 added in v1.9.0

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 added in v1.9.0

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 added in v1.9.0

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