xiaoyuyao commented on a change in pull request #941:
URL: https://github.com/apache/hadoop-ozone/pull/941#discussion_r428210556



##########
File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/shell/TestOzoneShellHA.java
##########
@@ -442,6 +446,27 @@ public void testOzoneShCmdList() {
     Assert.assertEquals(0, getNumOfBuckets("bucket"));
   }
 
+  @Test
+  public void testDeleteToTrash() throws Exception {
+    OzoneConfiguration confcli = new OzoneConfiguration(conf);
+    confcli.setInt(FS_TRASH_INTERVAL_KEY, 60);
+    confcli.set("fs.ofs.impl",
+        "org.apache.hadoop.fs.ozone.RootedOzoneFileSystem");
+    OzoneFsShell shell = new OzoneFsShell(confcli);
+    final String hostPrefix = OZONE_OFS_URI_SCHEME + "://" + omServiceId;
+    final String dirPrefix = hostPrefix + "/volumed2t/bucket1/dir1";
+    int res;
+    try {
+      res = ToolRunner.run(shell, new String[]{"-mkdir", "-p", dirPrefix});
+      Assert.assertEquals(0, res);
+      res = ToolRunner.run(shell, new String[]{"-touch", dirPrefix + "/key1"});
+      Assert.assertEquals(0, res);
+      res = ToolRunner.run(shell, new String[]{"-rm", dirPrefix + "/key1"});

Review comment:
       Can you add a test with skipTrash and make sure it is not moved to the 
Trash location?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to