MCPcopy Index your code
hub / github.com/cortesi/devd / TestPickPort

Function TestPickPort

server_test.go:35–45  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

33}
34
35func TestPickPort(t *testing.T) {
36 _, err := pickPort("127.0.0.1", 8000, 10000, true)
37 if err != nil {
38 t.Errorf("Could not bind to any port: %s", err)
39 }
40 _, err = pickPort("127.0.0.1", 8000, 8000, true)
41 if err == nil {
42 t.Errorf("Expected not to be able to bind to any port")
43 }
44
45}
46
47func fsEndpoint(s string) *filesystemEndpoint {
48 e, _ := newFilesystemEndpoint(s, []string{})

Callers

nothing calls this directly

Calls 1

pickPortFunction · 0.85

Tested by

no test coverage detected