12844: Refuse to unreference a directory by moving it into itself.
[arvados.git] / services / keep-web / cadaver_test.go
index d4a89c844b567a4d2fb8d3a94f8138e365a672d7..eb323674b9013daa80b7ee7bc1d472dcdd21cf01 100644 (file)
@@ -131,6 +131,17 @@ func (s *IntegrationSuite) TestWebdavWithCadaver(c *check.C) {
                        cmd:   "move newdir0/testfile newdir1/\n",
                        match: `(?ms).*Moving .* succeeded.*`,
                },
+               {
+                       path:  writePath,
+                       cmd:   "move newdir1 newdir1/\n",
+                       match: `(?ms).*Moving .* failed.*`,
+               },
+               {
+                       path:  writePath,
+                       cmd:   "get newdir1/testfile '" + checkfile.Name() + "'\n",
+                       match: `(?ms).*succeeded.*`,
+                       data:  testdata,
+               },
                {
                        path:  writePath,
                        cmd:   "put '" + localfile.Name() + "' newdir1/testfile1\n",