testing

package
v0.2.1-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultSSHPort

func DefaultSSHPort() string

DefaultSSHPort is the default SSH port

func Init

func Init()

Init initializes testing

Types

type SSHServer

type SSHServer struct {
	// contains filtered or unexported fields
}

func NewSSHServer

func NewSSHServer(name, port string) *SSHServer

func (*SSHServer) Start

func (s *SSHServer) Start() error

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 $HOME/.ssh:/config
  linuxserver/openssh-server

func (*SSHServer) Stop

func (s *SSHServer) Stop() error

Jump to

Keyboard shortcuts

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