Repository: jclouds
Updated Branches:
  refs/heads/master 2ef84dae8 -> 5cc3b243f


disable directory blob tests in OS X

On OS X, java doesn't support xattrs, which is required by
directory blobs. Disable those tests on OS X


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

Branch: refs/heads/master
Commit: 5cc3b243fc878a44091b78b14d8e5cb00086a75a
Parents: 2ef84da
Author: Ka-Hing Cheung <[email protected]>
Authored: Mon Jan 12 11:37:45 2015 -0800
Committer: Andrew Gaul <[email protected]>
Committed: Mon Jan 12 12:32:41 2015 -0800

----------------------------------------------------------------------
 .../org/jclouds/filesystem/FilesystemBlobStoreTest.java | 12 +++++++++---
 .../internal/FilesystemStorageStrategyImplTest.java     |  9 +++++++++
 2 files changed, 18 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/5cc3b243/apis/filesystem/src/test/java/org/jclouds/filesystem/FilesystemBlobStoreTest.java
----------------------------------------------------------------------
diff --git 
a/apis/filesystem/src/test/java/org/jclouds/filesystem/FilesystemBlobStoreTest.java
 
b/apis/filesystem/src/test/java/org/jclouds/filesystem/FilesystemBlobStoreTest.java
index 0caf21d..cb82ad9 100644
--- 
a/apis/filesystem/src/test/java/org/jclouds/filesystem/FilesystemBlobStoreTest.java
+++ 
b/apis/filesystem/src/test/java/org/jclouds/filesystem/FilesystemBlobStoreTest.java
@@ -58,6 +58,7 @@ import org.jclouds.util.Closeables2;
 import org.jclouds.util.Strings2;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
 import com.google.common.collect.Sets;
@@ -461,7 +462,7 @@ public class FilesystemBlobStoreTest {
         putBlobAndCheckIt(TestUtils.createRandomBlobKey("putBlob-", ".jpg"));
     }
 
-    @Test
+    @Test(dataProvider = "ignoreOnMacOSX")
     public void testPutDirectoryBlobs() {
         blobStore.createContainerInLocation(null, CONTAINER_NAME);
 
@@ -478,7 +479,7 @@ public class FilesystemBlobStoreTest {
         assertTrue(blobStore.blobExists(CONTAINER_NAME, childKey));
     }
 
-    @Test
+    @Test(dataProvider = "ignoreOnMacOSX")
     public void testGetDirectoryBlob() throws IOException {
         blobStore.createContainerInLocation(null, CONTAINER_NAME);
 
@@ -494,7 +495,7 @@ public class FilesystemBlobStoreTest {
                 blobKey.substring(0, blobKey.length() - 1)));
     }
 
-
+    @Test(dataProvider = "ignoreOnMacOSX")
     public void testListDirectoryBlobs() {
         blobStore.createContainerInLocation(null, CONTAINER_NAME);
         checkForContainerContent(CONTAINER_NAME, null);
@@ -869,4 +870,9 @@ public class FilesystemBlobStoreTest {
         TestUtils.fileExists(TARGET_CONTAINER_NAME + File.separator + blobKey, 
true);
     }
 
+    @DataProvider
+    public Object[][] ignoreOnMacOSX() {
+        return org.jclouds.utils.TestUtils.isMacOSX() ? 
TestUtils.NO_INVOCATIONS
+                : TestUtils.SINGLE_NO_ARG_INVOCATION;
+    }
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/5cc3b243/apis/filesystem/src/test/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImplTest.java
----------------------------------------------------------------------
diff --git 
a/apis/filesystem/src/test/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImplTest.java
 
b/apis/filesystem/src/test/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImplTest.java
index 4e198b4..ebab631 100644
--- 
a/apis/filesystem/src/test/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImplTest.java
+++ 
b/apis/filesystem/src/test/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImplTest.java
@@ -48,6 +48,7 @@ import org.jclouds.util.Throwables2;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.SkipException;
+import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
 import com.google.common.collect.ImmutableMap;
@@ -341,6 +342,7 @@ public class FilesystemStorageStrategyImplTest {
       assertEquals(newBlob.getMetadata().getName(), blobKey, "Created blob 
name is different");
    }
 
+   @Test(dataProvider = "ignoreOnMacOSX")
    public void testWriteDirectoryBlob() throws IOException {
       String blobKey = TestUtils.createRandomBlobKey("a/b/c/directory-", 
File.separator);
       Blob blob = storageStrategy.newBlob(blobKey);
@@ -352,6 +354,7 @@ public class FilesystemStorageStrategyImplTest {
       assertTrue(storageStrategy.blobExists(CONTAINER_NAME, blobKey));
    }
 
+   @Test(dataProvider = "ignoreOnMacOSX")
    public void testGetDirectoryBlob() throws IOException {
       String blobKey = TestUtils.createRandomBlobKey("a/b/c/directory-", 
File.separator);
       Blob blob = storageStrategy.newBlob(blobKey);
@@ -388,6 +391,7 @@ public class FilesystemStorageStrategyImplTest {
       storageStrategy.removeBlob(CONTAINER_NAME, blobKey);
    }
 
+   @Test(dataProvider = "ignoreOnMacOSX")
    public void testDeleteIntermediateDirectoryBlob() throws IOException {
       String parentKey = TestUtils.createRandomBlobKey("a/b/c/directory-", 
File.separator);
       String childKey = TestUtils.createRandomBlobKey(parentKey + 
"directory-", File.separator);
@@ -629,4 +633,9 @@ public class FilesystemStorageStrategyImplTest {
       return tempAbsolutePath;
    }
 
+   @DataProvider
+   public Object[][] ignoreOnMacOSX() {
+        return org.jclouds.utils.TestUtils.isMacOSX() ? 
TestUtils.NO_INVOCATIONS
+                : TestUtils.SINGLE_NO_ARG_INVOCATION;
+   }
 }

Reply via email to