X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/89be4b30feccc3680ca77339711b29367754dc05..1ea751256b6817e0c841e0a9c4b99d559de6f0b0:/services/keep-web/server_test.go diff --git a/services/keep-web/server_test.go b/services/keep-web/server_test.go index 8b689efbdc..0263dcf08f 100644 --- a/services/keep-web/server_test.go +++ b/services/keep-web/server_test.go @@ -164,16 +164,16 @@ func (s *IntegrationSuite) Test200(c *check.C) { dataMD5: "acbd18db4cc2f85cedef654fccc4a4d8", }, { - host: strings.Replace(arvadostest.FooPdh, "+", "-", 1) + ".collections.example.com", + host: strings.Replace(arvadostest.FooCollectionPDH, "+", "-", 1) + ".collections.example.com", path: "/t=" + arvadostest.ActiveToken + "/foo", dataMD5: "acbd18db4cc2f85cedef654fccc4a4d8", }, { - path: "/c=" + arvadostest.FooPdh + "/t=" + arvadostest.ActiveToken + "/foo", + path: "/c=" + arvadostest.FooCollectionPDH + "/t=" + arvadostest.ActiveToken + "/foo", dataMD5: "acbd18db4cc2f85cedef654fccc4a4d8", }, { - path: "/c=" + strings.Replace(arvadostest.FooPdh, "+", "-", 1) + "/t=" + arvadostest.ActiveToken + "/_/foo", + path: "/c=" + strings.Replace(arvadostest.FooCollectionPDH, "+", "-", 1) + "/t=" + arvadostest.ActiveToken + "/_/foo", dataMD5: "acbd18db4cc2f85cedef654fccc4a4d8", }, { @@ -266,9 +266,10 @@ func (s *IntegrationSuite) runCurl(c *check.C, token, host, uri string, args ... c.Log(fmt.Sprintf("curlArgs == %#v", curlArgs)) cmd := exec.Command("curl", curlArgs...) stdout, err := cmd.StdoutPipe() - c.Assert(err, check.Equals, nil) - cmd.Stderr = cmd.Stdout - go cmd.Start() + c.Assert(err, check.IsNil) + cmd.Stderr = os.Stderr + err = cmd.Start() + c.Assert(err, check.IsNil) buf := make([]byte, 2<<27) n, err := io.ReadFull(stdout, buf) // Discard (but measure size of) anything past 128 MiB. @@ -276,9 +277,9 @@ func (s *IntegrationSuite) runCurl(c *check.C, token, host, uri string, args ... if err == io.ErrUnexpectedEOF { buf = buf[:n] } else { - c.Assert(err, check.Equals, nil) + c.Assert(err, check.IsNil) discarded, err = io.Copy(ioutil.Discard, stdout) - c.Assert(err, check.Equals, nil) + c.Assert(err, check.IsNil) } err = cmd.Wait() // Without "-f", curl exits 0 as long as it gets a valid HTTP @@ -297,6 +298,7 @@ func (s *IntegrationSuite) runCurl(c *check.C, token, host, uri string, args ... } func (s *IntegrationSuite) TestMetrics(c *check.C) { + s.testServer.Config.AttachmentOnlyHost = s.testServer.Addr origin := "http://" + s.testServer.Addr req, _ := http.NewRequest("GET", origin+"/notfound", nil) _, err := http.DefaultClient.Do(req)