14716: Fix accidentally accepting credentials at public download URL.
[arvados.git] / services / keep-web / cadaver_test.go
index 44d0b0ffefa743dc931eb448bcadce510e5abf92..9d9e314fcaf7e25710f1fdd341ca13c7491413f0 100644 (file)
@@ -9,7 +9,6 @@ import (
        "fmt"
        "io"
        "io/ioutil"
-       "net/url"
        "os"
        "os/exec"
        "path/filepath"
@@ -74,7 +73,7 @@ func (s *IntegrationSuite) testCadaver(c *check.C, password string, pathFunc fun
        var newCollection arvados.Collection
        arv := arvados.NewClientFromEnv()
        arv.AuthToken = arvadostest.ActiveToken
-       err = arv.RequestAndDecode(&newCollection, "POST", "arvados/v1/collections", bytes.NewBufferString(url.Values{"collection": {"{}"}}.Encode()), nil)
+       err = arv.RequestAndDecode(&newCollection, "POST", "arvados/v1/collections", nil, map[string]interface{}{"collection": map[string]interface{}{}})
        c.Assert(err, check.IsNil)
 
        readPath, writePath, pdhPath := pathFunc(newCollection)
@@ -298,8 +297,8 @@ func (s *IntegrationSuite) TestCadaverByID(c *check.C) {
                c.Check(stdout, check.Matches, `(?ms).*collection is empty.*`)
        }
        for _, path := range []string{
-               "/by_id/" + arvadostest.FooPdh,
-               "/by_id/" + arvadostest.FooPdh + "/",
+               "/by_id/" + arvadostest.FooCollectionPDH,
+               "/by_id/" + arvadostest.FooCollectionPDH + "/",
                "/by_id/" + arvadostest.FooCollection,
                "/by_id/" + arvadostest.FooCollection + "/",
        } {