You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by ga...@apache.org on 2014/07/19 21:18:02 UTC

git commit: Enable more filesystem integration tests

Repository: jclouds
Updated Branches:
  refs/heads/master dd3dc9790 -> 370194b2b


Enable more filesystem integration tests

Other tests will require Java 7 xattr support.


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/370194b2
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/370194b2
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/370194b2

Branch: refs/heads/master
Commit: 370194b2be8facb2aa41d503779621a4dcef96dd
Parents: dd3dc97
Author: Andrew Gaul <ga...@apache.org>
Authored: Wed Jul 16 16:23:20 2014 -0700
Committer: Andrew Gaul <ga...@apache.org>
Committed: Sat Jul 19 12:17:23 2014 -0700

----------------------------------------------------------------------
 .../internal/FilesystemStorageStrategyImpl.java         |  8 ++++++--
 .../integration/FilesystemBlobIntegrationTest.java      | 11 +++--------
 .../integration/FilesystemContainerIntegrationTest.java | 12 +-----------
 3 files changed, 10 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/370194b2/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java
----------------------------------------------------------------------
diff --git a/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java b/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java
index b526fbf..cbbb027 100644
--- a/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java
+++ b/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java
@@ -121,13 +121,17 @@ public class FilesystemStorageStrategyImpl implements LocalStorageStrategy {
    @Override
    public void clearContainer(String container, ListContainerOptions options) {
       filesystemContainerNameValidator.validate(container);
-      // TODO implement options
+      if (options.getDir() != null) {
+         container += denormalize("/" + options.getDir());
+      }
       try {
          File containerFile = openFolder(container);
          File[] children = containerFile.listFiles();
          if (null != children) {
             for (File child : children)
-               Utils.deleteRecursively(child);
+               if (options.isRecursive() || child.isFile()) {
+                  Utils.deleteRecursively(child);
+               }
          }
       } catch (IOException e) {
          logger.error(e, "An error occurred while clearing container %s", container);

http://git-wip-us.apache.org/repos/asf/jclouds/blob/370194b2/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemBlobIntegrationTest.java
----------------------------------------------------------------------
diff --git a/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemBlobIntegrationTest.java b/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemBlobIntegrationTest.java
index bb20fc6..ef31fc4 100644
--- a/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemBlobIntegrationTest.java
+++ b/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemBlobIntegrationTest.java
@@ -60,21 +60,16 @@ public class FilesystemBlobIntegrationTest extends BaseBlobIntegrationTest {
 
    @Override
    public void testCreateBlobWithExpiry() throws InterruptedException {
-      throw new SkipException("not yet implemented");
+      throw new SkipException("requires Java 7 xattr support");
    }
 
    @Override
    public void testGetIfModifiedSince() throws InterruptedException {
-      throw new SkipException("not yet implemented");
+      throw new SkipException("requires Java 7 xattr support");
    }
 
    @Override
    public void testGetIfUnmodifiedSince() throws InterruptedException {
-      throw new SkipException("not yet implemented");
-   }
-
-   @Override
-   public void testPutObjectStream() throws InterruptedException, IOException, ExecutionException {
-      throw new SkipException("not yet implemented");
+      throw new SkipException("requires Java 7 xattr support");
    }
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/370194b2/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemContainerIntegrationTest.java
----------------------------------------------------------------------
diff --git a/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemContainerIntegrationTest.java b/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemContainerIntegrationTest.java
index 297d2fa65..39ae537 100644
--- a/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemContainerIntegrationTest.java
+++ b/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemContainerIntegrationTest.java
@@ -83,18 +83,8 @@ public class FilesystemContainerIntegrationTest extends BaseContainerIntegration
    }
 
    @Override
-   public void testClearWhenContentsUnderPath() throws InterruptedException {
-      throw new SkipException("not yet implemented");
-   }
-
-   @Override
-   public void testDirectory() throws InterruptedException {
-      throw new SkipException("not yet implemented");
-   }
-
-   @Override
    public void testWithDetails() throws InterruptedException, IOException {
-      throw new SkipException("not yet implemented");
+      throw new SkipException("requires Java 7 xattr support");
    }
 
    @Override