Author: adietish
Date: 2011-03-11 12:18:06 -0500 (Fri, 11 Mar 2011)
New Revision: 29710
Removed:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/APIResponseFakes.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/HardwareProfileResponseFakes.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ImageResponseFakes.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/InstanceResponseFakes.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/KeyResponseFakes.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/RealmResponseFakes.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ServerResponseFakes.java
Modified:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/.classpath
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/DeltaCloudTestSuite.launch
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/build.properties
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltaCloudIntegrationTestSuite.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltaCloudTestSuite.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ServerFake.java
Log:
[JBIDE-8562] removed client related tests
Property changes on: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test
___________________________________________________________________
Modified: svn:ignore
- deltacloud-dependencies
jruby-complete-1.5.3
build-custom-jruby.sh
jruby-src-1.5.3.zip
deltacloud2.jar
+ deltacloud-dependencies
jruby-complete-1.5.3
build-custom-jruby.sh
jruby-src-1.5.3.zip
deltacloud2.jar
target
jruby
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/.classpath
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/.classpath 2011-03-11 16:56:12
UTC (rev 29709)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/.classpath 2011-03-11 17:18:06
UTC (rev 29710)
@@ -3,7 +3,5 @@
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="lib"
path="deltacloud-dependencies.jar"/>
- <classpathentry kind="lib" path="jruby-complete-1.5.3.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/DeltaCloudTestSuite.launch
===================================================================
---
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/DeltaCloudTestSuite.launch 2011-03-11
16:56:12 UTC (rev 29709)
+++
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/DeltaCloudTestSuite.launch 2011-03-11
17:18:06 UTC (rev 29710)
@@ -36,7 +36,7 @@
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME"
value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND"
value="org.eclipse.jdt.junit.loader.junit4"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER"
value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE"
value="org.jboss.tools.internal.deltacloud.test.DeltaCloudTestSuite"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE"
value="org.jboss.tools.internal.deltacloud.test.DeltaCloudClientTestSuite"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS"
value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}
-consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR"
value="org.jboss.tools.deltacloud.test"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER"
value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/build.properties
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/build.properties 2011-03-11
16:56:12 UTC (rev 29709)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/build.properties 2011-03-11
17:18:06 UTC (rev 29710)
@@ -1,5 +1,4 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
- .,\
- jruby-complete-1.5.3.jar
+ .
Modified:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltaCloudIntegrationTestSuite.java
===================================================================
---
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltaCloudIntegrationTestSuite.java 2011-03-11
16:56:12 UTC (rev 29709)
+++
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltaCloudIntegrationTestSuite.java 2011-03-11
17:18:06 UTC (rev 29710)
@@ -11,10 +11,6 @@
package org.jboss.tools.internal.deltacloud.test;
import org.jboss.tools.internal.deltacloud.test.core.DeltaCloudMockIntegrationTest;
-import org.jboss.tools.internal.deltacloud.test.core.client.ImageMockIntegrationTest;
-import org.jboss.tools.internal.deltacloud.test.core.client.InstanceMockIntegrationTest;
-import org.jboss.tools.internal.deltacloud.test.core.client.KeyMockIntegrationTest;
-import
org.jboss.tools.internal.deltacloud.test.core.client.ServerTypeMockIntegrationTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -23,11 +19,7 @@
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({
- DeltaCloudMockIntegrationTest.class,
- ImageMockIntegrationTest.class,
- InstanceMockIntegrationTest.class,
- KeyMockIntegrationTest.class,
- ServerTypeMockIntegrationTest.class
+ DeltaCloudMockIntegrationTest.class
})
public class DeltaCloudIntegrationTestSuite {
Modified:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltaCloudTestSuite.java
===================================================================
---
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltaCloudTestSuite.java 2011-03-11
16:56:12 UTC (rev 29709)
+++
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltaCloudTestSuite.java 2011-03-11
17:18:06 UTC (rev 29710)
@@ -10,12 +10,6 @@
******************************************************************************/
package org.jboss.tools.internal.deltacloud.test;
-import org.jboss.tools.internal.deltacloud.test.core.client.APIDomUnmarshallingTest;
-import
org.jboss.tools.internal.deltacloud.test.core.client.HardwareProfileDomUnmarshallingTest;
-import org.jboss.tools.internal.deltacloud.test.core.client.ImageDomUnmarshallingTest;
-import
org.jboss.tools.internal.deltacloud.test.core.client.InstanceDomUnmarshallingTest;
-import org.jboss.tools.internal.deltacloud.test.core.client.KeyDomUnmarshallingTest;
-import org.jboss.tools.internal.deltacloud.test.core.client.RealmDomUnmarshallingTest;
import org.jboss.tools.internal.deltacloud.test.core.job.CloudSchedulingRulesTest;
import
org.jboss.tools.internal.deltacloud.test.ui.preferences.StringsPreferenceValueTest;
import org.junit.runner.RunWith;
@@ -27,12 +21,6 @@
@RunWith(Suite.class)
@Suite.SuiteClasses({
CloudSchedulingRulesTest.class,
- KeyDomUnmarshallingTest.class,
- InstanceDomUnmarshallingTest.class,
- ImageDomUnmarshallingTest.class,
- HardwareProfileDomUnmarshallingTest.class,
- APIDomUnmarshallingTest.class,
- RealmDomUnmarshallingTest.class,
StringsPreferenceValueTest.class})
public class DeltaCloudTestSuite {
}
Deleted:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/APIResponseFakes.java
===================================================================
---
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/APIResponseFakes.java 2011-03-11
16:56:12 UTC (rev 29709)
+++
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/APIResponseFakes.java 2011-03-11
17:18:06 UTC (rev 29710)
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.internal.deltacloud.test.fakes;
-
-/**
- * @author André Dietisheim
- */
-public class APIResponseFakes {
-
- public static class APIResponse {
- public static final String url =
"http://localhost:3001/api/keys/test1292840175447";
- public static final String driver = "ec2";
-
- public static final String apiResponse = getApiResponseXML(url, driver);
- public static final String invalidDriverApiResponse = getApiResponseXML(url,
"foo");
- }
-
- private static final String getApiResponseXML(String url, String driver) {
- return "<api driver='" + driver + "'
version='0.1'>"
- + " <link href='" + url + "realms'
rel='realms'>"
- + " </link>"
- + " <link href='" + url + "images'
rel='images'>"
- + " <feature name='owner_id'></feature>"
- + " </link>"
- + " <link href='" + url + "instance_states'
rel='instance_states'>"
- + " </link>"
- + " <link href='" + url + "instances'
rel='instances'>"
- + " <feature name='user_data'></feature>"
- + " <feature name='authentication_key'></feature>"
- + " <feature name='public_ip'></feature>"
- + " <feature name='security_group'></feature>"
- + " </link>"
- + " <link href='" + url + "hardware_profiles'
rel='hardware_profiles'>"
- + " </link>"
- + " <link href='" + url + "storage_snapshots'
rel='storage_snapshots'>"
- + " </link>"
- + " <link href='" + url + "storage_volumes'
rel='storage_volumes'>"
- + " </link>"
- + " <link href='" + url + "keys'
rel='keys'>"
- + " </link>"
- + " <link href='" + url + "buckets'
rel='buckets'>"
- + " <feature name='bucket_location'></feature>"
- + " </link>"
- + "</api>";
-
- }
-
-}
Deleted:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/HardwareProfileResponseFakes.java
===================================================================
---
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/HardwareProfileResponseFakes.java 2011-03-11
16:56:12 UTC (rev 29709)
+++
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/HardwareProfileResponseFakes.java 2011-03-11
17:18:06 UTC (rev 29710)
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.internal.deltacloud.test.fakes;
-
-import org.jboss.tools.deltacloud.core.client.Property;
-import org.jboss.tools.deltacloud.core.client.Property.UNIT;
-
-/**
- * @author André Dietisheim
- */
-public class HardwareProfileResponseFakes {
-
- public static class HardwareProfile1Response {
- public static final String id = "m1-small";
- public static final String propMemKind = Property.Kind.FIXED.name().toLowerCase();
- public static final String propMemUnit = UNIT.MB.name();
- public static final String propMemValue = "1740.8";
- public static final String propStorageKind = Property.Kind.FIXED.name().toLowerCase();
- public static final String propStorageUnit = UNIT.GB.name();
- public static final String propStorageValue = "160";
- public static final String propCPUKind = Property.Kind.FIXED.name().toLowerCase();
- public static final String propCPUUnit = UNIT.COUNT.name().toLowerCase();
- public static final String propCPUValue = "1";
- public static final String propArchKind = Property.Kind.FIXED.name().toLowerCase();
- public static final String propArchUnit = UNIT.LABEL.name().toLowerCase();
- public static final String propArchValue = "i386";
-
- public static final String response = getHardwareProfileResponseXML(
- id,
- new String[] {
- getFixedPropertyXML(Property.Names.MEMORY.name().toLowerCase(), propMemUnit,
propMemValue),
- getFixedPropertyXML(Property.Names.STORAGE.name().toLowerCase(), propStorageUnit,
- propStorageValue),
- getFixedPropertyXML(Property.Names.CPU.name().toLowerCase(), propCPUUnit,
propCPUValue),
- getFixedPropertyXML(Property.Names.ARCHITECTURE.name().toLowerCase(),
propArchUnit,
- propArchValue)
- });
- }
-
- public static class HardwareProfile2Response {
- public static final String id = "m1-large";
- public static final String propMemKind = Property.Kind.RANGE.name().toLowerCase();
- public static final String propMemUnit = UNIT.MB.name();
- public static final String propMemValue = "10240";
- public static final String propMemRangeFirst = "7680.0";
- public static final String propMemRangeLast = "15360";
- public static final String propStorageKind = Property.Kind.ENUM.name().toLowerCase();
- public static final String propStorageUnit = UNIT.GB.name();
- public static final String propStorageValue = "160";
- public static final String propStorageEnum1 = "850";
- public static final String propStorageEnum2 = "1024";
- public static final String propCPUKind = Property.Kind.FIXED.name().toLowerCase();
- public static final String propCPUUnit = UNIT.COUNT.name().toLowerCase();
- public static final String propCPUValue = "2";
- public static final String propArchKind = Property.Kind.FIXED.name().toLowerCase();
- public static final String propArchUnit = UNIT.LABEL.name().toLowerCase();
- public static final String propArchValue = "x86_64";
-
- public static final String response = getHardwareProfileResponseXML(
- id,
- new String[] {
- getRangePropertyXML(Property.Names.MEMORY.name().toLowerCase(), propMemUnit,
propMemValue,
- propMemRangeFirst, propMemRangeLast),
- getEnumPropertyXML(Property.Names.STORAGE.name().toLowerCase(), propStorageUnit,
- propStorageValue, propStorageEnum1, propStorageEnum2),
- getFixedPropertyXML(Property.Names.CPU.name().toLowerCase(), propCPUUnit,
propCPUValue),
- getFixedPropertyXML(Property.Names.ARCHITECTURE.name().toLowerCase(),
propArchUnit,
- propArchValue)
- });
- }
-
- public static class HardwareProfilesResponse {
-
- public static final String response =
- "<hardware_profiles>"
- + HardwareProfile1Response.response
- + HardwareProfile2Response.response
- +"</hardware_profiles>";
- }
-
- private static final String getHardwareProfileResponseXML(String id, String[]
properties) {
- StringBuilder builder = new StringBuilder();
- for (String propertyString : properties) {
- builder.append(propertyString);
- }
- return getHardwareProfileResponseXML(id, builder.toString());
- }
-
- private static final String getHardwareProfileResponseXML(String id, String properties)
{
- return new StringBuilder()
- .append("<hardware_profile href=\"fakeUrl\"
id=\"").append(id).append("\">")
- .append("<name>fakeName</name>")
- .append(properties)
- .append("</hardware_profile>")
- .toString();
- }
-
- private static String getFixedPropertyXML(String name, String unit, String value) {
- return getPropertyXML(name, "fixed", unit, value)
- + getClodingPropertyTag();
- }
-
- private static String getRangePropertyXML(String name, String unit, String value, String
first, String last) {
- return getPropertyXML(name, "range", unit, value)
- + "<range first='" + first + "' last='" + last +
"'/>"
- + getClodingPropertyTag();
- }
-
- private static String getEnumPropertyXML(String name, String unit, String value,
String... enumValues) {
- StringBuilder builder = new StringBuilder(getPropertyXML(name, "enum", unit,
value));
- builder.append("<enum>");
- for (String enumValue : enumValues) {
- builder.append("<entry value='").append(enumValue).append("'
/>");
- }
- builder.append("</enum>");
- builder.append(getClodingPropertyTag());
- return builder.toString();
- }
-
- private static String getPropertyXML(String name, String kind, String unit, String
value) {
- return "<property kind=\"" + kind + "\" name=\""
+ name + "\" unit=\"" + unit + "\" value=\"" +
value + "\">";
- }
-
- private static String getClodingPropertyTag() {
- return "</property>";
-
- }
-
-}
Deleted:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ImageResponseFakes.java
===================================================================
---
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ImageResponseFakes.java 2011-03-11
16:56:12 UTC (rev 29709)
+++
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ImageResponseFakes.java 2011-03-11
17:18:06 UTC (rev 29710)
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.internal.deltacloud.test.fakes;
-
-
-/**
- * @author André Dietisheim
- */
-public class ImageResponseFakes {
-
- public static class ImageResponse {
- public static final String url =
"http://try.steamcannon.org/deltacloud/api/images/ami-16a3577f";
- public static final String id = "ami-16a3577f";
- public static final String name = "sles-10-sp3-v1.00.i386";
- public static final String ownerId = "013907871322";
- public static final String description = "SUSE Linux Enterprise Server 10 Service
Pack 3 for x86 (v1.00)";
- public static final String architecture = "i386";
-
- public static final String response = getImageResponseXML(url, id, name, ownerId,
description, architecture);
- }
-
- public static class ImagesResponse {
-
- public static final String url1 =
"http://try.steamcannon.org/deltacloud/api/images/ami-16a3577f";
- public static final String id1 = "ami-16a3577f";
- public static final String name1 = "sles-10-sp3-v1.00.i386";
- public static final String ownerId1 = "013907871322";
- public static final String description1 = "SUSE Linux Enterprise Server 10 Service
Pack 3 for x86 (v1.00)";
- public static final String architecture1 = "i386";
-
- public static final String url2 =
"http://try.steamcannon.org/deltacloud/api/images/ami-16a3578f";
- public static final String id2 = "ami-16a3578f";
- public static final String name2 = "sles-10-sp3-v2.00.i686";
- public static final String ownerId2 = "013907871422";
- public static final String description2 = "SUSE Linux Enterprise Server 10 Service
Pack 3 for x86 (v2.00)";
- public static final String architecture2 = "i686";
-
- public static final String response =
- "<images>"
- + getImageResponseXML(url1, id1, name1, ownerId1, description1, architecture1)
- + getImageResponseXML(url2, id2, name2, ownerId2, description2, architecture2)
- + "</images>";
-
- }
-
- private static String getImageResponseXML(String url, String id, String name, String
ownerId,
- String description, String architecture) {
- return "<image href='" + url + "' id='" + id +
"'>"
- + "<name>" + name + "</name>"
- + "<owner_id>" + ownerId + "</owner_id>"
- + "<description>" + description + "</description>"
- + "<architecture>" + architecture +
"</architecture>"
- + "<state></state>"
- + "</image>";
- }
-}
Deleted:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/InstanceResponseFakes.java
===================================================================
---
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/InstanceResponseFakes.java 2011-03-11
16:56:12 UTC (rev 29709)
+++
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/InstanceResponseFakes.java 2011-03-11
17:18:06 UTC (rev 29710)
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.internal.deltacloud.test.fakes;
-
-import org.jboss.tools.deltacloud.core.client.StateAware.State;
-
-/**
- * @author André Dietisheim
- */
-public class InstanceResponseFakes {
-
- public static class InstanceActionResponse {
- public static final String url =
"http://try.steamcannon.org/deltacloud/api/instances/i-6f16e503/start";
- public static final String method = "post";
- public static final String name = "start";
- public static final String response = ServerResponseFakes.getActionXML(url, method,
name);
- }
-
- public static class InstanceResponse {
- public static final String url1 =
"http://try.steamcannon.org/deltacloud/api/instances/i-6f16e503";
- public static final String id1 = "i-6f16e503";
- public static final String name1 = "ami-7d07ec14";
- public static final String ownerId1 = "357159121505";
- public static final String image1Url =
"http://try.steamcannon.org/deltacloud/api/images/ami-7d07ec14";
- public static final String image1Id = "ami-7d07ec14";
- public static final String realm1Url =
"http://try.steamcannon.org/deltacloud/api/realms/us-east-1a";
- public static final String realm1Id = "us-east-1a";
- public static final State state = State.RUNNING;
- public static final String hardwareProfile1Url =
"http://try.steamcannon.org/deltacloud/api/hardware_profiles/m1.small";
- public static final String hardwareProfile1Id = "m1.small";
- public static final String keyname1 = "ad10";
- public static final String actionNameStop = "stop";
- public static final String actionNameReboot = "reboot";
- public static final String publicAddress1 =
"ec2-50-16-108-18.compute-1.amazonaws.com";
- public static final String privateAddress1 =
"ec2-50-16-108-18.compute-1.amazonaws.com";
-
- public static final String response = getInstanceResponseXML(url1, id1, name1,
ownerId1, image1Url,
- image1Id, realm1Url, realm1Id, state, hardwareProfile1Url, hardwareProfile1Id,
keyname1,
- actionNameStop, actionNameReboot, publicAddress1, privateAddress1);
- }
-
- public static class InstancesResponse {
-
- public static final String url1 =
"http://try.steamcannon.org/deltacloud/api/instances/i-6f16e503";
- public static final String id1 = "i-6f16e503";
- public static final String name1 = "ami-7d07ec14";
- public static final String ownerId1 = "357159121505";
- public static final String image1Url =
"http://try.steamcannon.org/deltacloud/api/images/ami-7d07ec14";
- public static final String image1Id = "ami-7d07ec14";
- public static final String realm1Url =
"http://try.steamcannon.org/deltacloud/api/realms/us-east-1a";
- public static final String realm1Id = "us-east-1a";
- public static final State state = State.RUNNING;
- public static final String hardwareProfile1Url =
"http://try.steamcannon.org/deltacloud/api/hardware_profiles/m1.small";
- public static final String hardwareProfile1Id = "m1.small";
- public static final String keyname1 = "ad10";
- public static final String actionNameStop = "stop";
- public static final String actionNameReboot = "reboot";
- public static final String publicAddress1 =
"ec2-50-16-108-18.compute-1.amazonaws.com";
- public static final String privateAddress1 =
"ec2-50-16-108-18.compute-1.amazonaws.com";
-
- public static final String url2 =
"http://try.steamcannon.org/deltacloud/api/instances/i-6f16e553";
- public static final String id2 = "i-6f16e503";
- public static final String name2 = "ami-7d07ec14";
- public static final String ownerId2 = "357159121505";
- public static final String image2Url =
"http://try.steamcannon.org/deltacloud/api/images/ami-7d07ec17";
- public static final String image2Id = "ami-7d07ec14";
- public static final String realm2Url =
"http://try.steamcannon.org/deltacloud/api/realms/us-east-2a";
- public static final String realm2Id = "us-east-2a";
- public static final State state2 = State.STOPPED;
- public static final String hardwareProfile2Url =
"http://try.steamcannon.org/deltacloud/api/hardware_profiles/m1.large";
- public static final String hardwareProfile2Id = "m1.large";
- public static final String keyname2 = "ad11";
- public static final String publicAddress2 =
"ec2-50-16-108-19.compute-2.amazonaws.com";
- public static final String privateAddress2 =
"ec2-50-16-108-19.compute-2.amazonaws.com";
-
- public static final String response =
- "<instances>"
- + getInstanceResponseXML(url1, id1, name1, ownerId1, image1Url,
- image1Id, realm1Url, realm1Id, state, hardwareProfile1Url, hardwareProfile1Id,
- keyname1,
- actionNameStop, actionNameReboot, publicAddress1, privateAddress1)
- + getInstanceResponseXML(url2, id2, name2, ownerId2, image2Url,
- image2Id, realm2Url, realm2Id, state, hardwareProfile2Url, hardwareProfile2Id,
- keyname2,
- actionNameReboot, actionNameReboot, publicAddress2, privateAddress2)
- + "</instances>";
-
- }
-
- private static final String getInstanceResponseXML(String url, String id, String name,
String owner,
- String imageUrl, String imageId, String realmUrl, String realmId, State state,
- String hardwareProfileUrl, String hardwareProfileId, String keyname, String
actionName1,
- String actionName2, String publicAddress, String privateAddress) {
- return "<instance href=\""
- + url
- + "\" id=\""
- + id
- + "\">"
- + "<name>"
- + name
- + "</name>"
- + "<owner_id>"
- + owner
- + "</owner_id>"
- + "<image href=\""
- + imageUrl
- + "\" id=\""
- + imageId
- + "\"/>"
- + getRealmResponseXML(realmUrl, realmId)
- + "<state>"
- + state.toString()
- + "</state>"
- + getHardwareProfileXML(hardwareProfileUrl, hardwareProfileId)
- + "<actions>"
- +
ServerResponseFakes.getActionXML("http://try.steamcannon.org/deltacl...
+ id
- + "/reboot", "post", actionName1)
- +
ServerResponseFakes.getActionXML("http://try.steamcannon.org/deltacl...
+ id
- + "/stop", "post", actionName2)
- + "</actions>"
- + "<public_addresses>"
- + getAddressXML(publicAddress)
- + "</public_addresses>"
- + "<private_addresses>"
- + getAddressXML(privateAddress)
- + "</private_addresses>"
- + "<authentication type='key'>"
- + "<login>"
- + "<keyname>" + keyname + "</keyname>"
- + "</login>"
- + "</authentication>"
- + "</instance>";
- }
-
- private static String getAddressXML(String address) {
- return "<address>" + address + "</address>";
- }
-
- private static String getHardwareProfileXML(String url, String id) {
- return "<hardware_profile href=\"" + url + "\"
id=\"" + id + "\"></hardware_profile>";
- }
-
- private static String getRealmResponseXML(String url, String id) {
- return "<realm href=\"" + url + "\" id=\"" + id +
"\"/>";
- }
-
-}
Deleted:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/KeyResponseFakes.java
===================================================================
---
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/KeyResponseFakes.java 2011-03-11
16:56:12 UTC (rev 29709)
+++
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/KeyResponseFakes.java 2011-03-11
17:18:06 UTC (rev 29710)
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.internal.deltacloud.test.fakes;
-
-/**
- * @author André Dietisheim
- */
-public class KeyResponseFakes {
-
- public static class KeyActionResponse {
- public static final String url =
"http://localhost:3001/api/keys/test1292840175447";
- public static final String method = "delete";
- public static final String name = "destroy";
- public static final String keyActionResponse = ServerResponseFakes.getActionXML(url,
method, name);
- }
-
- public static class KeyResponse {
- public static final String url =
"http://localhost:3001/api/keys/test1292840175447";
- public static final String method = "delete";
- public static final String id = "test1292840175447";
- public static final String name = "destroy";
- public static final String fingerprint =
"60:7c:f6:9e:e0:a1:52:bc:c0:9a:11:80:a7:1b:f6:8b:c6:55:cd:1f";
- public static final String pem =
- "-----BEGIN RSA PRIVATE KEY-----"
- +
"YkFqsstgVJqYc=sxypCDk=qJbHOmhQNYxaQR4vna=ccPbj68MuxQSZ9tiyu+Z8yAog0DI65/j6u\n"
- +
"xE6gTMsqqTrDkGmAwhiGLsgORkQyxEthGyDfA40YaBf5/5F=Cvuj2zpnp63JIrUrqoqI1FQYhnA\n"
- +
"U34yKaj8+3/0AqsdEmWsWLMbV4HXaRtGZOPbERnJE28EhLlq/v+9wC59hpIZt6s4K0eRBYxCWz/\n"
- +
"xvEG=7wZJi7WE0/tsH9YIAHaLRqyxV7H5kRqaYExZhUpBgf/x745KJlPpr1I20BJSrj6Fw4z4P5\n"
- +
"DIUPDWit8aQdnBpO2fq9eQLGZKyWmj5xpzFm5DxbV1K=bdmqCnC6XHTLcfV4fqW1egYg2DK5WCj\n"
- +
"nsl+mQjn4CNvEdymhna7+Bw0D3JcPcW/EGUrsBGEGLT/suQbEi8x0vQscpBEAizq5GZaKZ6Kec9\n"
- +
"7MOHpx7qDqIAPjH9Y3ben7EaR0O3laY/OPrFREw8jP=mptePHF2r07s52QkdqkbU4ePC5BSWOcb\n"
- +
"bhOqypbbv9V8YssYLyt6m3VOJFHOoERaDJQ2fMmqTDuFc87lxDrChJk4cw0q9o6Q+YzEnjTqGQo\n"
- +
"XcwTtutpL97f1HjO34XlcHn3B1iZ8lsQGJWry9MWaiCdjj02v0mfN+UpbIQNBX452Xllf8YM//0\n"
- +
"Kaylt3GZvr2bJsJ=lQIUIxVzREHd7ym/hRNTBx5qK2/=8h57IdyQHZSnjDT05qDRsSPcm5nQmbM\n"
- +
"dgivv0/vXogWg9ehbym4DNez38QVkQaoJuKd/ESBIU2p8PIEXWC13HHzIMDbkbM235nFn3Roj59\n"
- +
"xt2AJoQnltdfuhA4+5ApnnIYcWzgkd8vWZPhNL2u40Sw1ZPrM+g4n7H48IdwtE3vZ0XfF3Lpdee\n"
- +
"IReubErRzxIMNVz=PrLQMAOhukYNJeH63PdxfSsJf7rtGwA1qEF1WcZ1ibvAuFr0G3KQalGCgCh\n"
- +
"zkF63HCWcjafUTJ3jE6/U5ZPu8GrhAQQqu=r3NyzLgoTBaNwfe7ybxvBBofjdmD9xPipOhrQjDC\n"
- +
"PDeaMDZ6XzwAddh4fd1K3kl29DXNBmPAgfaG8CgdnHVc/gQgAv40RvWDNnYae0/MGE+qrLN0XXF\n"
- +
"1g3qHLkmqdtg88nCH=X7kf6FZZ3LE+bLKIF2Y4Xh3X8sqHlImLWSlKvKu6/CuB4GsrfLxu1VLdc\n"
- +
"ee3DxUIaqz3LmkERnT7ALcMBjBjRNp=DR=x7zON0f0Nht0gIj1vvDWQmEzRqGxgTwS2PtGL3bOZ\n"
- +
"v2hiV3G3+S/9SAD9rfiW9Ws1YLH5mVDcHcKWhHXoM/UqPj3ob3yGzvYgR+X/dIg7tug/k=TTtD8\n"
- +
"1wkG4gTjHkfEhCs05/+PZ4rFG15nVpv06e/a3nXtyDQ77qH3irRPsLZDp/CWFdt=Poe4NLX46gE\n"
- +
"nU07L+ueqgZUa8Tq6A9oG7QUyjtJh4ZxkShYkIullvUksW0yppaIeB32Xxw2XVEtdu/v=rFHSHh\n"
- +
"HwoZ1A/=ku7ICdMg5gD6U+Zg0YlxniHDaSJ8A6kdt2iUaPaZQQcH8T4yh90CKHhbl5NzhxAu3Jz\n"
- +
"dc=oRQqdzizw9UrN84wEmQ6r9hDHUq2x14PR=xBzwLGzR2dh73GdjxF5OmOrp3m4yCkw\n"
- + "-----END RSA PRIVATE KEY-----\n";
- public static final String keyResponse = getKeyResponseXML(id, fingerprint, pem, url,
method, name);
- }
-
- public static class KeysResponse {
-
- public static final String url1 =
"http://localhost:3001/api/keys/test1292840175417";
- public static final String method1 = "delete";
- public static final String id1 = "test1292840175447";
- public static final String name1 = "destroy";
- public static final String fingerprint1 =
"60:7c:f6:9e:e0:a1:52:bc:c0:9a:11:80:a7:1b:f6:8b:c6:55:cd:1f";
- public static final String pem1 = "-----BEGIN RSA PRIVATE KEY-----"
- +
"YkFqsstgVJqYc=sxypCDk=qJbHOmhQNYxaQR4vna=ccPbj68MuxQSZ9tiyu+Z8yAog0DI65/j6u\n";
-
- public static final String url2 =
"http://localhost:3001/api/keys/test1292840175427";
- public static final String method2 = "delete";
- public static final String id2 = "test1292840175447";
- public static final String name2 = "destroy";
- public static final String fingerprint2 =
"60:7c:f6:9e:e0:a1:52:bc:c0:9a:11:80:a7:1b:f6:8b:c6:55:cd:1f";
- public static final String pem2 =
- "-----BEGIN RSA PRIVATE KEY-----"
- +
"YkFqsstgVJqYc=sxypCDk=qJbHOmhQNYxaQR4vna=ccPbj68MuxQSZ9tiyu+Z8yAog0DI65/j6u";
-
- public static final String keysResponse =
- "<keys>"
- + getKeyResponseXML(id1, fingerprint1, pem1, url1, method1, name1)
- + getKeyResponseXML(id2, fingerprint2, pem2, url2, method2, name2)
- + "</keys>";
- }
-
- private static final String getKeyResponseXML(String id, String fingerprint, String pem,
String url, String method,
- String name) {
- return "<key href='" + url + "' id='" + id +
"' type='key'>"
- + "<actions>"
- + ServerResponseFakes.getActionXML(url, method, name)
- + "</actions>"
- + "<fingerprint>" + fingerprint + "</fingerprint>"
- + "<pem><pem>" + pem + "</pem></pem>"
- + "<state></state>"
- + "</key>";
-
- }
-
-}
Deleted:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/RealmResponseFakes.java
===================================================================
---
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/RealmResponseFakes.java 2011-03-11
16:56:12 UTC (rev 29709)
+++
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/RealmResponseFakes.java 2011-03-11
17:18:06 UTC (rev 29710)
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.internal.deltacloud.test.fakes;
-
-import org.jboss.tools.deltacloud.core.client.Realm.RealmState;
-
-/**
- * @author André Dietisheim
- */
-public class RealmResponseFakes {
-
- public static final RealmResponse realmResponse = new RealmResponse(
- "http://try.steamcannon.org/deltacloud/api/realms/us-east-1a",
- "us-east-1a",
- "us-east-1a",
- RealmState.AVAILABLE.toString().toLowerCase(),
- "22");
- public static final RealmResponse invalidLimitRealmResponse = new RealmResponse(
- "http://try.steamcannon.org/deltacloud/api/realms/us-east-1a",
- "us-east-1a",
- "us-east-1a",
- RealmState.AVAILABLE.toString().toLowerCase(),
- "aa");
-
- public static class RealmResponse {
-
- public RealmResponse(String url, String id, String name, String state, String limit) {
- this.url = url;
- this.id = id;
- this.name = name;
- this.state = state;
- this.limit = limit;
- this.response = getRealmResponseXML(url, id, name, state, limit);
- }
-
- public String url =
"http://try.steamcannon.org/deltacloud/api/realms/us-east-1a";
- public String id = "us-east-1a";
- public String name = "us-east-1a";
- public String state = RealmState.AVAILABLE.toString().toLowerCase();
- public String limit = "22";
- public String response = getRealmResponseXML(url, id, name, state, limit);
-
- public int getIntLimit() {
- return Integer.parseInt(limit);
- }
- }
-
- public static class RealmsResponse {
-
- public static final String url1 =
"http://try.steamcannon.org/deltacloud/api/realms/us-east-1a";
- public static final String id1 = "us-east-1a";
- public static final String name1 = "us-east-1a";
- public static final String state1 = RealmState.AVAILABLE.toString().toLowerCase();
- public static final String limit1 = "2";
-
- public static final String url2 =
"http://try.steamcannon.org/deltacloud/api/realms/us-east-2a";
- public static final String id2 = "us-east-2a";
- public static final String name2 = "us-east-2a";
- public static final String state2 = RealmState.AVAILABLE.toString().toLowerCase();
- public static final String limit2 = "12";
-
- public static final String response =
- "<realms>"
- + getRealmResponseXML(url1, id1, name1, state1, limit1)
- + getRealmResponseXML(url2, id2, name2, state2, limit2)
- + "</realms>";
-
- }
-
- private static String getRealmResponseXML(String url, String id, String name, String
state, String limit) {
- return "<realm href='" + url + "' id='" + id +
"'>"
- + "<name>" + name + "</name>"
- + "<state>" + state + "</state>"
- + "<limit>" + limit + "</limit>"
- + "</realm>";
- }
-}
Modified:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ServerFake.java
===================================================================
---
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ServerFake.java 2011-03-11
16:56:12 UTC (rev 29709)
+++
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ServerFake.java 2011-03-11
17:18:06 UTC (rev 29710)
@@ -17,6 +17,9 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
+/**
+ * @author André Dietisheim
+ */
public class ServerFake {
public static final int DEFAULT_PORT = 3003;
Deleted:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ServerResponseFakes.java
===================================================================
---
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ServerResponseFakes.java 2011-03-11
16:56:12 UTC (rev 29709)
+++
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ServerResponseFakes.java 2011-03-11
17:18:06 UTC (rev 29710)
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.internal.deltacloud.test.fakes;
-
-/**
- * @author André Dietisheim
- */
-public class ServerResponseFakes {
-
- public static final String getActionXML(String url, String method, String name) {
- return "<link "
- + "method='" + method + "' "
- + "href='" + url + "' "
- + "rel='" + name + "' />";
- }
-}