Documentation
¶
Index ¶
- Variables
- func NextPortValue() string
- func NextResourceName() string
- func Username() (string, error)
- func WriteKeys(rootPath string) error
- type KindCluster
- type SSHServer
- type TestSupport
- func (t *TestSupport) CurrentUsername() string
- func (t *TestSupport) KindClusterContextName() string
- func (t *TestSupport) KindKubeConfigFile() string
- func (t *TestSupport) MaxConnectionRetries() int
- func (t *TestSupport) PortValue() string
- func (t *TestSupport) PrivateKeyPath() string
- func (t *TestSupport) ResourceName() string
- func (t *TestSupport) SetupKindCluster() error
- func (t *TestSupport) SetupKindKubeConfig() (string, error)
- func (t *TestSupport) SetupSSHServer() error
- func (t *TestSupport) SimulateTerminatingPod() error
- func (t *TestSupport) StartNginxPod() error
- func (t *TestSupport) TearDown() error
- func (t *TestSupport) TmpDirRoot() string
- func (t *TestSupport) WorkDirRoot() string
Constants ¶
This section is empty.
Variables ¶
View Source
var (
InfraSetupWait = time.Second * 11
)
Functions ¶
func NextPortValue ¶ added in v0.3.0
func NextPortValue() string
NextPortValue returns a pseudo-rando test [2200 .. 2290]
func NextResourceName ¶ added in v0.3.0
func NextResourceName() string
NextResourceName returns crashd-test-XXXX name
Types ¶
type KindCluster ¶
type KindCluster struct {
// contains filtered or unexported fields
}
func NewKindCluster ¶
func NewKindCluster(config, name, tmpRootDir string) *KindCluster
func (*KindCluster) Create ¶
func (k *KindCluster) Create() error
func (*KindCluster) Destroy ¶
func (k *KindCluster) Destroy() error
func (*KindCluster) GetKubeCtlContext ¶
func (k *KindCluster) GetKubeCtlContext() string
func (*KindCluster) MakeKubeConfigFile ¶
func (k *KindCluster) MakeKubeConfigFile(path string) error
func (*KindCluster) SimulateTerminatingPod ¶ added in v0.4.0
func (k *KindCluster) SimulateTerminatingPod() error
func (*KindCluster) StartNginxPod ¶ added in v0.4.1
func (k *KindCluster) StartNginxPod() error
type SSHServer ¶
type SSHServer struct {
// contains filtered or unexported fields
}
func NewSSHServer ¶
func (*SSHServer) MountedDir ¶ added in v0.3.0
func (*SSHServer) PrivateKey ¶ added in v0.3.0
func (*SSHServer) Start ¶
StartSSHServer starts starts sshd process using image linuxserver/openssh-server.DockerRunSSH The server opnes up port 2222 with the following command
docker create \ --name=test-sshd \ -e PUBLIC_KEY_FILE=$HOME/.ssh/id_rsa.pub \ -e USER_NAME=$USER \ -e SUDO_ACCESS=true \ -p 2222:2222 \ -v ./testing/server-name:/config linuxserver/openssh-server
type TestSupport ¶ added in v0.3.0
type TestSupport struct {
// contains filtered or unexported fields
}
func (*TestSupport) CurrentUsername ¶ added in v0.3.0
func (t *TestSupport) CurrentUsername() string
CurrentUsername returns the current username or error
func (*TestSupport) KindClusterContextName ¶ added in v0.3.4
func (t *TestSupport) KindClusterContextName() string
func (*TestSupport) KindKubeConfigFile ¶ added in v0.3.0
func (t *TestSupport) KindKubeConfigFile() string
func (*TestSupport) MaxConnectionRetries ¶ added in v0.3.0
func (t *TestSupport) MaxConnectionRetries() int
func (*TestSupport) PortValue ¶ added in v0.3.0
func (t *TestSupport) PortValue() string
PortValue returns a string with a random value that can be used as port
func (*TestSupport) PrivateKeyPath ¶ added in v0.3.0
func (t *TestSupport) PrivateKeyPath() string
func (*TestSupport) ResourceName ¶ added in v0.3.0
func (t *TestSupport) ResourceName() string
ResourceName resturns string that can be used to name resource
func (*TestSupport) SetupKindCluster ¶ added in v0.3.0
func (t *TestSupport) SetupKindCluster() error
func (*TestSupport) SetupKindKubeConfig ¶ added in v0.3.0
func (t *TestSupport) SetupKindKubeConfig() (string, error)
func (*TestSupport) SetupSSHServer ¶ added in v0.3.0
func (t *TestSupport) SetupSSHServer() error
func (*TestSupport) SimulateTerminatingPod ¶ added in v0.4.0
func (t *TestSupport) SimulateTerminatingPod() error
func (*TestSupport) StartNginxPod ¶ added in v0.4.1
func (t *TestSupport) StartNginxPod() error
func (*TestSupport) TearDown ¶ added in v0.3.0
func (t *TestSupport) TearDown() error
func (*TestSupport) TmpDirRoot ¶ added in v0.3.0
func (t *TestSupport) TmpDirRoot() string
func (*TestSupport) WorkDirRoot ¶ added in v0.3.0
func (t *TestSupport) WorkDirRoot() string
Click to show internal directories.
Click to hide internal directories.