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

Function TestTryLogin_NoCombinations

pkg/control/ssh_integration_test.go:104–117  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

102}
103
104func TestTryLogin_NoCombinations(t *testing.T) {
105 cfg, _ := setupSSHTestConfig(t)
106 // Remove all credentials so GenerateCombination produces nothing useful
107 cfg.Main.Users = []string{}
108 cfg.Main.Ports = []string{}
109 cfg.Main.Passwords = []string{}
110 cfg.Main.Keys = []string{}
111
112 ctrl := NewSSHController("10.0.0.99", cfg)
113 ctrl.TryLogin("", 1, 1*time.Nanosecond)
114
115 assert.False(t, ctrl.cacheIsFound)
116 // Should complete without panic even with no combinations
117}
118
119func TestTryLogin_ConcurrencyZero(t *testing.T) {
120 cfg, _ := setupSSHTestConfig(t)

Callers

nothing calls this directly

Calls 3

TryLoginMethod · 0.95
setupSSHTestConfigFunction · 0.85
NewSSHControllerFunction · 0.85

Tested by

no test coverage detected