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

Function newTestMainConfig

pkg/control/ssh_test.go:11–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9)
10
11func newTestMainConfig() *config.MainConfig {
12 c := &config.MainConfig{}
13 c.Main.Users = []string{"root", "admin"}
14 c.Main.Ports = []string{"22", "2222"}
15 c.Main.Passwords = []string{"password123", "admin123"}
16 c.Main.Keys = []string{}
17 c.ServerLists = []config.ServerListConfig{
18 {
19 IP: "192.168.1.1",
20 Port: "22",
21 User: "root",
22 Password: "password123",
23 Alias: "server1",
24 },
25 {
26 IP: "192.168.1.2",
27 Port: "22",
28 User: "admin",
29 Password: "admin123",
30 Alias: "server2",
31 },
32 }
33 return c
34}
35
36func TestNewSSHController(t *testing.T) {
37 cfg := newTestMainConfig()

Calls

no outgoing calls

Tested by

no test coverage detected