(t *testing.T)
| 204 | } |
| 205 | |
| 206 | func TestProgramExternalConnectivity(t *testing.T) { |
| 207 | request := `{"NetworkID":"d76cfa51738e8a12c5eca71ee69e9d65010a4b48eaad74adab439be7e61b9aaf","EndpointID":"abccfa51738e8a12c5eca71ee69e9d65010a4b48eaad74adab439be7e61b9aaf","Options":{"com.docker.network.endpoint.exposedports":[{"Proto":6,"Port":70}],"com.docker.network.portmap":[{"Proto":6,"IP":"","Port":70,"HostIP":"","HostPort":7000,"HostPortEnd":7000}]}}` |
| 208 | response, err := http.Post("http://localhost:32234/NetworkDriver.ProgramExternalConnectivity", |
| 209 | sdk.DefaultContentTypeV1_1, |
| 210 | strings.NewReader(request)) |
| 211 | if err != nil { |
| 212 | t.Fatal(err) |
| 213 | } |
| 214 | defer response.Body.Close() |
| 215 | |
| 216 | if response.StatusCode != http.StatusOK { |
| 217 | body, _ := io.ReadAll(response.Body) |
| 218 | t.Fatalf("Expected %d, got %d: %s\n", http.StatusOK, response.StatusCode, string(body)) |
| 219 | } |
| 220 | } |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…