mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix TestValidRemoteDriver GetCapabilities errors
This test was producing error messages due to missing endpoints in the plugin API; ``` === RUN TestValidRemoteDriver ERRO[0039] error getting capability for valid-network-driver due to NetworkDriver.GetCapabilities: 404 page not found ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
992e4b903a
commit
cc38e3a35c
1 changed files with 4 additions and 0 deletions
|
@ -1375,6 +1375,10 @@ func TestValidRemoteDriver(t *testing.T) {
|
|||
w.Header().Set("Content-Type", "application/vnd.docker.plugins.v1+json")
|
||||
fmt.Fprintf(w, `{"Implements": ["%s"]}`, driverapi.NetworkPluginEndpointType)
|
||||
})
|
||||
mux.HandleFunc(fmt.Sprintf("/%s.GetCapabilities", driverapi.NetworkPluginEndpointType), func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "application/vnd.docker.plugins.v1+json")
|
||||
fmt.Fprintf(w, `{"Scope":"local"}`)
|
||||
})
|
||||
mux.HandleFunc(fmt.Sprintf("/%s.CreateNetwork", driverapi.NetworkPluginEndpointType), func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "application/vnd.docker.plugins.v1+json")
|
||||
fmt.Fprintf(w, "null")
|
||||
|
|
Loading…
Reference in a new issue