Documentation ¶
Index ¶
- func RunCommandOnServer(privKey string, server *hcloud.Server, command string) error
- func WaitForHTTPAvailable(t *testing.T, ingressIP string, useHTTPS bool)
- func WaitForHTTPOnServer(t *testing.T, srv *hcloud.Server, privateKey, tgtIP string, useHTTPS bool)
- func WithSSHSession(privKey string, host string, fn func(*ssh.Session) error) error
- type K8sDistribution
- type TestCluster
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunCommandOnServer ¶
func WaitForHTTPAvailable ¶
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 ¶
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
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
Click to show internal directories.
Click to hide internal directories.