14345: Accept lock/unlock requests as no-ops.
authorTom Clegg <tclegg@veritasgenetics.com>
Thu, 18 Oct 2018 13:41:37 +0000 (09:41 -0400)
committerTom Clegg <tclegg@veritasgenetics.com>
Thu, 8 Nov 2018 16:21:33 +0000 (11:21 -0500)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg@veritasgenetics.com>

services/keep-web/cadaver_test.go
services/keep-web/handler.go

index 0e2f17c35b85df02b98df4d3e29a974d18deb17d..b89890956ca0933cc720d5fdb4ab726ea1b9ea15 100644 (file)
@@ -145,6 +145,16 @@ func (s *IntegrationSuite) testCadaver(c *check.C, password string, pathFunc fun
                        cmd:   "move testfile newdir0/\n",
                        match: `(?ms).*Moving .* failed.*`,
                },
+               {
+                       path:  writePath,
+                       cmd:   "lock newdir0/testfile\n",
+                       match: `(?ms).*Locking .* succeeded.*`,
+               },
+               {
+                       path:  writePath,
+                       cmd:   "unlock newdir0/testfile\nasdf\n",
+                       match: `(?ms).*Unlocking .* succeeded.*`,
+               },
                {
                        path:  writePath,
                        cmd:   "ls\n",
@@ -243,6 +253,11 @@ func (s *IntegrationSuite) testCadaver(c *check.C, password string, pathFunc fun
                        cmd:   "delete foo\n",
                        match: `(?ms).*Deleting .* failed:.*405 Method Not Allowed.*`,
                },
+               {
+                       path:  pdhPath,
+                       cmd:   "lock foo\n",
+                       match: `(?ms).*Locking .* failed:.*405 Method Not Allowed.*`,
+               },
        } {
                c.Logf("%s %+v", "http://"+s.testServer.Addr, trial)
                if skip != nil && skip(trial.path) {
index 95948e32505f40112cff4da72c88692d7ea6edff..6aeb7b9c48dfb2859841c72f19e2ff78c282e5aa 100644 (file)
@@ -143,20 +143,24 @@ var (
        writeMethod = map[string]bool{
                "COPY":   true,
                "DELETE": true,
+               "LOCK":   true,
                "MKCOL":  true,
                "MOVE":   true,
                "PUT":    true,
                "RMCOL":  true,
+               "UNLOCK": true,
        }
        webdavMethod = map[string]bool{
                "COPY":     true,
                "DELETE":   true,
+               "LOCK":     true,
                "MKCOL":    true,
                "MOVE":     true,
                "OPTIONS":  true,
                "PROPFIND": true,
                "PUT":      true,
                "RMCOL":    true,
+               "UNLOCK":   true,
        }
        browserMethod = map[string]bool{
                "GET":  true,