testsession

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package testsession provides utilities to test SSH sessions.

more or less copied from charmbracelet/ssh tests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Listen

func Listen(tb testing.TB, srv *ssh.Server) string

Listen starts a test server.

func New

func New(tb testing.TB, srv *ssh.Server, cfg *gossh.ClientConfig) *gossh.Session

New starts a local SSH server with the given config and returns a client session. It automatically closes everything afterwards.

func NewClientSession

func NewClientSession(tb testing.TB, addr string, config *gossh.ClientConfig) (*gossh.Session, error)

NewClientSession creates a new client session to the given address.

Types

This section is empty.

Jump to

Keyboard shortcuts

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