X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/5ce674d60eefc8a0183b0f6b014fe263721a7c86..37044d922164855ba5cc443e775037ab12cdbf95:/services/keepproxy/keepproxy_test.go diff --git a/services/keepproxy/keepproxy_test.go b/services/keepproxy/keepproxy_test.go index 12d65201da..4e53797d80 100644 --- a/services/keepproxy/keepproxy_test.go +++ b/services/keepproxy/keepproxy_test.go @@ -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)