MCPcopy
hub / github.com/henrygd/beszel / TestStartServerDisableSSH

Function TestStartServerDisableSSH

agent/server_test.go:185–199  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

183}
184
185func TestStartServerDisableSSH(t *testing.T) {
186 t.Setenv("BESZEL_AGENT_DISABLE_SSH", "true")
187
188 agent, err := NewAgent("")
189 require.NoError(t, err)
190
191 opts := ServerOptions{
192 Network: "tcp",
193 Addr: ":45990",
194 }
195
196 err = agent.StartServer(opts)
197 assert.Error(t, err)
198 assert.Contains(t, err.Error(), "SSH disabled")
199}
200
201/////////////////////////////////////////////////////////////////
202//////////////////// ParseKeys Tests ////////////////////////////

Callers

nothing calls this directly

Calls 2

StartServerMethod · 0.95
NewAgentFunction · 0.85

Tested by

no test coverage detected