Help us shape the future of Go! Take the 2026 Go Developer Survey

sshagenttest

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package sshagenttest serves an in-memory ssh-agent for tests, and pins SSH_AUTH_SOCK so a developer's own agent cannot change a result.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func None

func None(t *testing.T)

None pins SSH_AUTH_SOCK to empty for the rest of the test.

func Start

func Start(t *testing.T) agent.Agent

Start serves an empty agent keyring on a fresh socket, points SSH_AUTH_SOCK at it for the rest of the test, and returns the keyring.

func WriteEncryptedKey

func WriteEncryptedKey(t *testing.T, path, passphrase string) crypto.PrivateKey

WriteEncryptedKey writes a passphrase-protected ed25519 key and its .pub beside it at path, as the init wizard does, and returns the private key.

Types

This section is empty.

Jump to

Keyboard shortcuts

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