17464: Fix shadowed "sess" variable
[arvados.git] / services / keep-web / handler_test.go
index 446d591bfd715224651c1d9667e0c451e81f664e..b8c7443f0c073c816f992d9e969d7f6de610f496 100644 (file)
@@ -32,6 +32,10 @@ import (
 
 var _ = check.Suite(&UnitSuite{})
 
+func init() {
+       arvados.DebugLocksPanicMode = true
+}
+
 type UnitSuite struct {
        Config *arvados.Config
 }
@@ -1174,6 +1178,27 @@ func (s *IntegrationSuite) TestCacheWriteCollectionSamePDH(c *check.C) {
        checkWithID(colls[0].UUID, http.StatusOK)
 }
 
+// func (s *IntegrationSuite) TestUploadDownloadLogging(c *check.C) {
+//     u := mustParseURL("http://" + arvadostest.FooCollection + ".keep-web.example/foo")
+//     req := &http.Request{
+//             Method:     "GET",
+//             Host:       u.Host,
+//             URL:        u,
+//             RequestURI: u.RequestURI(),
+//             Header: http.Header{
+//                     "Authorization": {"Bearer " + arvadostest.ActiveToken},
+//             },
+//     }
+
+//     var logbuf bytes.Buffer
+//     logger := logrus.New()
+//     logger.Out = &logbuf
+//     req = req.WithContext(ctxlog.Context(context.Background(), logger))
+//     s.doReq(req)
+
+//     c.Check(logbuf.String(), check.Matches, `Download file*`)
+// }
+
 func copyHeader(h http.Header) http.Header {
        hc := http.Header{}
        for k, v := range h {