()
| 9 | ) |
| 10 | |
| 11 | func 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 | |
| 36 | func TestNewSSHController(t *testing.T) { |
| 37 | cfg := newTestMainConfig() |
no outgoing calls
no test coverage detected