AbsPath should be compatible with proxy-prefixes:

- replace Config.Prefix with .Host and .APIPath
- Request .path promoted to .pathPrefix, .baseURL holds required prefix
This commit is contained in:
James DeFelice
2016-01-06 23:59:54 +00:00
parent 9724447456
commit 75f487f7bf
17 changed files with 158 additions and 119 deletions

View File

@@ -190,7 +190,7 @@ func TestRequestExecuteRemoteCommand(t *testing.T) {
server := httptest.NewServer(fakeExecServer(t, i, testCase.Stdin, testCase.Stdout, testCase.Stderr, testCase.Error, testCase.Tty, testCase.MessageCount))
url, _ := url.ParseRequestURI(server.URL)
c := client.NewRESTClient(url, unversioned.GroupVersion{Group: "x"}, nil, -1, -1)
c := client.NewRESTClient(url, "", unversioned.GroupVersion{Group: "x"}, nil, -1, -1)
req := c.Post().Resource("testing")
req.SetHeader(httpstream.HeaderProtocolVersion, StreamProtocolV2Name)
req.Param("command", "ls")
@@ -272,7 +272,7 @@ func TestRequestAttachRemoteCommand(t *testing.T) {
server := httptest.NewServer(fakeExecServer(t, i, testCase.Stdin, testCase.Stdout, testCase.Stderr, testCase.Error, testCase.Tty, 1))
url, _ := url.ParseRequestURI(server.URL)
c := client.NewRESTClient(url, unversioned.GroupVersion{Group: "x"}, nil, -1, -1)
c := client.NewRESTClient(url, "", unversioned.GroupVersion{Group: "x"}, nil, -1, -1)
req := c.Post().Resource("testing")
conf := &client.Config{