Fixed up the simulator to run with windows paths in cygwin

This commit is contained in:
Alex Huang 2013-05-06 16:34:03 -07:00
parent 2639b9f91e
commit bc823f946c
6 changed files with 30 additions and 10 deletions

View File

@ -48,6 +48,7 @@ public class MockSecStorageVO implements InternalIdentity {
}
@Override
public long getId() {
return this.id;
}
@ -57,7 +58,7 @@ public class MockSecStorageVO implements InternalIdentity {
}
public void setMountPoint(String mountPoint) {
this.mountPoint = mountPoint;
this.mountPoint = mountPoint.replace('\\', '/');
}
public String getUrl() {

View File

@ -66,6 +66,7 @@ public class MockStoragePoolVO implements InternalIdentity {
this.hostGuid = hostGuid;
}
@Override
public long getId() {
return this.id;
}
@ -91,7 +92,7 @@ public class MockStoragePoolVO implements InternalIdentity {
}
public void setMountPoint(String mountPoint) {
this.mountPoint = mountPoint;
this.mountPoint = mountPoint.replace('\\', '/');
}
public long getCapacity() {

View File

@ -66,6 +66,7 @@ public class MockVolumeVO implements InternalIdentity {
@Enumerated(value=EnumType.STRING)
private VMTemplateStorageResourceAssoc.Status status;
@Override
public long getId() {
return id;
}
@ -90,7 +91,7 @@ public class MockVolumeVO implements InternalIdentity {
}
public void setPath(String path) {
this.path = path;
this.path = path.replace('\\', '/');
}
public long getPoolId() {

View File

@ -95,11 +95,6 @@
<artifactId>cloud-framework-events</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-utils</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<defaultGoal>install</defaultGoal>

View File

@ -163,6 +163,8 @@ class TestDeployVM(cloudstackTestCase):
cls.services["account"],
domainid=domain.id
)
cls.debug(str("============" ))
cls.debug(cls.account.id)
cls.service_offering = ServiceOffering.create(
cls.apiclient,

View File

@ -220,6 +220,26 @@
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>setproperty</id>
<phase>validate</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<source>
pom.properties['resolved.userdir']='${user.dir}'.replace('\','/').replace('D:','/cyg/d');
pom.properties['resolved.marvin.config']='${marvin.config}'.replace('\','/').replace('D:','/cyg/d');
</source>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
@ -237,11 +257,11 @@
<arguments>
<argument>--with-marvin</argument>
<argument>--marvin-config</argument>
<argument>${user.dir}/${marvin.config}</argument>
<argument>${resolved.user.dir}/${resolved.marvin.config}</argument>
<argument>--load</argument>
<argument>-a</argument>
<argument>tags=${tag}</argument>
<argument>${user.dir}/${test}</argument>
<argument>${resolved.user.dir}/${test}</argument>
<argument>-v</argument>
</arguments>
</configuration>