MCPcopy Create free account
hub / github.com/Driver-C/tryssh / TestNewAliasListCommand_Run

Function TestNewAliasListCommand_Run

cmd/alias/alias_test.go:126–136  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

124}
125
126func TestNewAliasListCommand_Run(t *testing.T) {
127 cleanup := setupTempConfigWithServers(t)
128 defer cleanup()
129
130 cmd := NewAliasListCommand()
131 output := captureOutput(t, func() {
132 cmd.Run(cmd, []string{})
133 })
134 assert.Contains(t, output, "Alias: myserver")
135 assert.Contains(t, output, "192.168.1.1")
136}
137
138func TestNewAliasListCommand_Run_EmptyConfig(t *testing.T) {
139 cleanup := setupTempConfig(t)

Callers

nothing calls this directly

Calls 3

NewAliasListCommandFunction · 0.85
captureOutputFunction · 0.70

Tested by

no test coverage detected