Ignoring the tests that cause issue 402 on Windows for the 1.0.0 release
diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/VCloudAsyncClientTest.java b/apis/vcloud/src/test/java/org/jclouds/vcloud/VCloudAsyncClientTest.java
index e88de13..2129120 100644
--- a/apis/vcloud/src/test/java/org/jclouds/vcloud/VCloudAsyncClientTest.java
+++ b/apis/vcloud/src/test/java/org/jclouds/vcloud/VCloudAsyncClientTest.java
@@ -42,6 +42,7 @@
import org.jclouds.vcloud.options.CaptureVAppOptions;
import org.jclouds.vcloud.options.CloneVAppOptions;
import org.jclouds.vcloud.options.InstantiateVAppTemplateOptions;
+import org.jclouds.vcloud.utils.TestUtils;
import org.jclouds.vcloud.xml.CatalogHandler;
import org.jclouds.vcloud.xml.CatalogItemHandler;
import org.jclouds.vcloud.xml.OrgHandler;
@@ -54,6 +55,7 @@
import org.jclouds.vcloud.xml.VDCHandler;
import org.jclouds.vcloud.xml.VmHandler;
import org.testng.annotations.BeforeClass;
+import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import com.google.inject.TypeLiteral;
@@ -115,6 +117,7 @@
checkFilters(request);
}
+ @Test(dataProvider = "ignoreOnWindows", description = "see http://code.google.com/p/jclouds/issues/detail?id=402")
public void testUpdateGuestConfiguration() throws SecurityException, NoSuchMethodException, IOException {
Method method = VCloudAsyncClient.class.getMethod("updateGuestCustomizationOfVm", URI.class,
GuestCustomizationSection.class);
@@ -812,4 +815,10 @@
syncClient = injector.getInstance(VCloudClient.class);
}
+ @DataProvider
+ public Object[][] ignoreOnWindows() {
+ return (TestUtils.isWindowsOs() ? TestUtils.NO_INVOCATIONS
+ : TestUtils.SINGLE_NO_ARG_INVOCATION);
+ }
+
}
diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/features/VmAsyncClientTest.java b/apis/vcloud/src/test/java/org/jclouds/vcloud/features/VmAsyncClientTest.java
index e84a1b4..3562118 100644
--- a/apis/vcloud/src/test/java/org/jclouds/vcloud/features/VmAsyncClientTest.java
+++ b/apis/vcloud/src/test/java/org/jclouds/vcloud/features/VmAsyncClientTest.java
@@ -31,8 +31,10 @@
import org.jclouds.util.Strings2;
import org.jclouds.vcloud.BaseVCloudAsyncClientTest;
import org.jclouds.vcloud.domain.GuestCustomizationSection;
+import org.jclouds.vcloud.utils.TestUtils;
import org.jclouds.vcloud.xml.TaskHandler;
import org.jclouds.vcloud.xml.VmHandler;
+import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import com.google.inject.TypeLiteral;
@@ -69,6 +71,7 @@
checkFilters(request);
}
+ @Test(dataProvider = "ignoreOnWindows", description = "see http://code.google.com/p/jclouds/issues/detail?id=402")
public void testUpdateGuestConfiguration() throws SecurityException, NoSuchMethodException, IOException {
Method method = VmAsyncClient.class.getMethod("updateGuestCustomizationOfVm", GuestCustomizationSection.class,
URI.class);
@@ -316,4 +319,10 @@
checkFilters(request);
}
+ @DataProvider
+ public Object[][] ignoreOnWindows() {
+ return (TestUtils.isWindowsOs() ? TestUtils.NO_INVOCATIONS
+ : TestUtils.SINGLE_NO_ARG_INVOCATION);
+ }
+
}
diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/utils/TestUtils.java b/apis/vcloud/src/test/java/org/jclouds/vcloud/utils/TestUtils.java
new file mode 100644
index 0000000..1831852
--- /dev/null
+++ b/apis/vcloud/src/test/java/org/jclouds/vcloud/utils/TestUtils.java
@@ -0,0 +1,34 @@
+/**
+ *
+ * Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
+ *
+ * ====================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ====================================================================
+ */
+package org.jclouds.vcloud.utils;
+
+
+/**
+ * Utility class for test
+ *
+ * @author Andrew Phillips
+ */
+public class TestUtils {
+ public static final Object[][] NO_INVOCATIONS = new Object[0][0];
+ public static final Object[][] SINGLE_NO_ARG_INVOCATION = new Object[][] { new Object[0] };
+
+ public static boolean isWindowsOs() {
+ return System.getProperty("os.name", "").toLowerCase().contains("windows");
+ }
+}