(t *testing.T)
| 183 | } |
| 184 | |
| 185 | func 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 //////////////////////////// |
nothing calls this directly
no test coverage detected