(t *testing.T)
| 150 | } |
| 151 | |
| 152 | func TestCapabilitiesExchange(t *testing.T) { |
| 153 | response, err := http.Get("http://localhost:32234/NetworkDriver.GetCapabilities") |
| 154 | if err != nil { |
| 155 | t.Fatal(err) |
| 156 | } |
| 157 | defer response.Body.Close() |
| 158 | body, err := io.ReadAll(response.Body) |
| 159 | |
| 160 | expected := `{"Scope":"local","ConnectivityScope":"global"}` |
| 161 | if string(body) != expected+"\n" { |
| 162 | t.Fatalf("Expected %s, got %s\n", expected+"\n", string(body)) |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | func TestCreateNetworkSuccess(t *testing.T) { |
| 167 | request := `{"NetworkID":"d76cfa51738e8a12c5eca71ee69e9d65010a4b48eaad74adab439be7e61b9aaf","Options":{"com.docker.network.generic":{}},"IPv4Data":[{"AddressSpace":"","Gateway":"172.18.0.1/16","Pool":"172.18.0.0/16"}],"IPv6Data":[]}` |
nothing calls this directly
no test coverage detected
searching dependent graphs…