Merge branch '20825-cwl-separate-runner' refs #20825
[arvados.git] / services / keepproxy / keepproxy_test.go
index 12d65201dafd4503699a63802d37b6ff0b662c13..4e53797d80044715baa672ed38a82d0e3cf32a5e 100644 (file)
@@ -146,7 +146,6 @@ func runProxy(c *C, bogusClientToken bool, loadKeepstoresFromConfig bool, kp *ar
                TestProxyUUID: "http://" + srv.Addr,
        }
        kc.SetServiceRoots(sr, sr, sr)
-       kc.Arvados.External = true
        return srv, kc, logbuf
 }
 
@@ -370,7 +369,7 @@ func (s *ServerRequiredSuite) TestPutAskGet(c *C) {
                c.Check(err, Equals, nil)
                c.Log("Finished PutB (expected success)")
 
-               c.Check(logbuf.String(), Matches, `(?ms).*msg="Block upload".* locator=acbd18db4cc2f85cedef654fccc4a4d8\+3.* user_full_name="TestCase Administrator".* user_uuid=zzzzz-tpzed-d9tiejq69daie8f.*`)
+               c.Check(logbuf.String(), Matches, `(?ms).* locator=acbd18db4cc2f85cedef654fccc4a4d8\+3.* userFullName="TestCase Administrator".* userUUID=zzzzz-tpzed-d9tiejq69daie8f.*`)
                logbuf.Reset()
        }
 
@@ -379,7 +378,7 @@ func (s *ServerRequiredSuite) TestPutAskGet(c *C) {
                c.Assert(err, Equals, nil)
                c.Check(blocklen, Equals, int64(3))
                c.Log("Finished Ask (expected success)")
-               c.Check(logbuf.String(), Matches, `(?ms).*msg="Block download".* locator=acbd18db4cc2f85cedef654fccc4a4d8\+3.* user_full_name="TestCase Administrator".* user_uuid=zzzzz-tpzed-d9tiejq69daie8f.*`)
+               c.Check(logbuf.String(), Matches, `(?ms).* locator=acbd18db4cc2f85cedef654fccc4a4d8\+3.* userFullName="TestCase Administrator".* userUUID=zzzzz-tpzed-d9tiejq69daie8f.*`)
                logbuf.Reset()
        }
 
@@ -391,7 +390,7 @@ func (s *ServerRequiredSuite) TestPutAskGet(c *C) {
                c.Check(all, DeepEquals, []byte("foo"))
                c.Check(blocklen, Equals, int64(3))
                c.Log("Finished Get (expected success)")
-               c.Check(logbuf.String(), Matches, `(?ms).*msg="Block download".* locator=acbd18db4cc2f85cedef654fccc4a4d8\+3.* user_full_name="TestCase Administrator".* user_uuid=zzzzz-tpzed-d9tiejq69daie8f.*`)
+               c.Check(logbuf.String(), Matches, `(?ms).* locator=acbd18db4cc2f85cedef654fccc4a4d8\+3.* userFullName="TestCase Administrator".* userUUID=zzzzz-tpzed-d9tiejq69daie8f.*`)
                logbuf.Reset()
        }
 
@@ -473,10 +472,10 @@ func testPermission(c *C, admin bool, perm arvados.UploadDownloadPermission) {
                        c.Check(err, Equals, nil)
                        c.Log("Finished PutB (expected success)")
                        if admin {
-                               c.Check(logbuf.String(), Matches, `(?ms).*msg="Block upload".* locator=acbd18db4cc2f85cedef654fccc4a4d8\+3.* user_full_name="TestCase Administrator".* user_uuid=zzzzz-tpzed-d9tiejq69daie8f.*`)
+                               c.Check(logbuf.String(), Matches, `(?ms).* locator=acbd18db4cc2f85cedef654fccc4a4d8\+3.* userFullName="TestCase Administrator".* userUUID=zzzzz-tpzed-d9tiejq69daie8f.*`)
                        } else {
 
-                               c.Check(logbuf.String(), Matches, `(?ms).*msg="Block upload".* locator=acbd18db4cc2f85cedef654fccc4a4d8\+3.* user_full_name="Active User".* user_uuid=zzzzz-tpzed-xurymjxw79nv3jz.*`)
+                               c.Check(logbuf.String(), Matches, `(?ms).* locator=acbd18db4cc2f85cedef654fccc4a4d8\+3.* userFullName="Active User".* userUUID=zzzzz-tpzed-xurymjxw79nv3jz.*`)
                        }
                } else {
                        c.Check(hash2, Equals, "")
@@ -497,9 +496,9 @@ func testPermission(c *C, admin bool, perm arvados.UploadDownloadPermission) {
                        c.Check(blocklen, Equals, int64(3))
                        c.Log("Finished Get (expected success)")
                        if admin {
-                               c.Check(logbuf.String(), Matches, `(?ms).*msg="Block download".* locator=acbd18db4cc2f85cedef654fccc4a4d8\+3.* user_full_name="TestCase Administrator".* user_uuid=zzzzz-tpzed-d9tiejq69daie8f.*`)
+                               c.Check(logbuf.String(), Matches, `(?ms).* locator=acbd18db4cc2f85cedef654fccc4a4d8\+3.* userFullName="TestCase Administrator".* userUUID=zzzzz-tpzed-d9tiejq69daie8f.*`)
                        } else {
-                               c.Check(logbuf.String(), Matches, `(?ms).*msg="Block download".* locator=acbd18db4cc2f85cedef654fccc4a4d8\+3.* user_full_name="Active User".* user_uuid=zzzzz-tpzed-xurymjxw79nv3jz.*`)
+                               c.Check(logbuf.String(), Matches, `(?ms).* locator=acbd18db4cc2f85cedef654fccc4a4d8\+3.* userFullName="Active User".* userUUID=zzzzz-tpzed-xurymjxw79nv3jz.*`)
                        }
                } else {
                        c.Check(err, FitsTypeOf, &keepclient.ErrNotFound{})
@@ -608,22 +607,22 @@ func (s *ServerRequiredSuite) TestStripHint(c *C) {
 }
 
 // Test GetIndex
-//   Put one block, with 2 replicas
-//   With no prefix (expect the block locator, twice)
-//   With an existing prefix (expect the block locator, twice)
-//   With a valid but non-existing prefix (expect "\n")
-//   With an invalid prefix (expect error)
+// - Put one block, with 2 replicas
+// - With no prefix (expect the block locator, twice)
+// - With an existing prefix (expect the block locator, twice)
+// - With a valid but non-existing prefix (expect "\n")
+// - With an invalid prefix (expect error)
 func (s *ServerRequiredSuite) TestGetIndex(c *C) {
        getIndexWorker(c, false)
 }
 
 // Test GetIndex
-//   Uses config.yml
-//   Put one block, with 2 replicas
-//   With no prefix (expect the block locator, twice)
-//   With an existing prefix (expect the block locator, twice)
-//   With a valid but non-existing prefix (expect "\n")
-//   With an invalid prefix (expect error)
+// - Uses config.yml
+// - Put one block, with 2 replicas
+// - With no prefix (expect the block locator, twice)
+// - With an existing prefix (expect the block locator, twice)
+// - With a valid but non-existing prefix (expect "\n")
+// - With an invalid prefix (expect error)
 func (s *ServerRequiredConfigYmlSuite) TestGetIndex(c *C) {
        getIndexWorker(c, true)
 }
@@ -696,7 +695,7 @@ func (s *ServerRequiredSuite) TestCollectionSharingToken(c *C) {
        defer srv.Close()
        hash, _, err := kc.PutB([]byte("shareddata"))
        c.Check(err, IsNil)
-       kc.Arvados.ApiToken = arvadostest.FooCollectionSharingToken
+       kc.Arvados.ApiToken = arvadostest.FooFileCollectionSharingToken
        rdr, _, _, err := kc.Get(hash)
        c.Assert(err, IsNil)
        data, err := ioutil.ReadAll(rdr)