MCPcopy
hub / github.com/cli/cli / NewContextForTests

Function NewContextForTests

pkg/ssh/ssh_keys.go:23–28  ·  view source on GitHub ↗

NewContextForTests creates a new `ssh.Context` with internal properties set to the specified values. It should only be used to inject test-specific setup.

(configDir, keygenExe string)

Source from the content-addressed store, hash-verified

21// NewContextForTests creates a new `ssh.Context` with internal properties set to the
22// specified values. It should only be used to inject test-specific setup.
23func NewContextForTests(configDir, keygenExe string) Context {
24 return Context{
25 configDir,
26 keygenExe,
27 }
28}
29
30type KeyPair struct {
31 PublicKeyPath string

Callers 3

TestLoginFunction · 0.92
TestSelectSSHKeysFunction · 0.92

Calls

no outgoing calls

Tested by 3

TestLoginFunction · 0.74
TestSelectSSHKeysFunction · 0.74