mirror of https://github.com/apache/jclouds.git
vcloud-director: fixing expect tests that were incorrectly passing due to missing requestline check in BaseRestClientExpectTest
This commit is contained in:
parent
f11518fa1e
commit
305a593d9a
|
@ -80,7 +80,7 @@ public class MediaClientExpectTest extends VCloudDirectorAdminClientExpectTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCloneMedia() {
|
public void testCloneMedia() {
|
||||||
URI cloneUri = URI.create(endpoint + "/vdc/e9cd3387-ac57-4d27-a481-9bee75e0690f/action/cloneMedia");
|
URI vdcURI = URI.create(endpoint + "/vdc/e9cd3387-ac57-4d27-a481-9bee75e0690f");
|
||||||
|
|
||||||
VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse,
|
VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse,
|
||||||
new VcloudHttpRequestPrimer()
|
new VcloudHttpRequestPrimer()
|
||||||
|
@ -105,7 +105,7 @@ public class MediaClientExpectTest extends VCloudDirectorAdminClientExpectTest {
|
||||||
.build();
|
.build();
|
||||||
Media expected = cloneMedia();
|
Media expected = cloneMedia();
|
||||||
|
|
||||||
assertEquals(client.getMediaClient().cloneMedia(cloneUri, params), expected);
|
assertEquals(client.getMediaClient().cloneMedia(vdcURI, params), expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -394,7 +394,7 @@ public class VAppTemplateClientExpectTest extends VCloudDirectorAdminClientExpec
|
||||||
VAppTemplateClient client = orderedRequestsSendResponses(loginRequest, sessionResponse,
|
VAppTemplateClient client = orderedRequestsSendResponses(loginRequest, sessionResponse,
|
||||||
new VcloudHttpRequestPrimer().apiCommand("GET", templateId + "/metadata").acceptMedia(ANY).httpRequestBuilder().build(),
|
new VcloudHttpRequestPrimer().apiCommand("GET", templateId + "/metadata").acceptMedia(ANY).httpRequestBuilder().build(),
|
||||||
new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/metadata.xml", METADATA).httpResponseBuilder().build(),
|
new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/metadata.xml", METADATA).httpResponseBuilder().build(),
|
||||||
new VcloudHttpRequestPrimer().apiCommand("PUT", templateId + "/metadata").xmlFilePayload("/vapptemplate/metadata.xml", METADATA).acceptMedia(TASK).httpRequestBuilder().build(),
|
new VcloudHttpRequestPrimer().apiCommand("POST", templateId + "/metadata").xmlFilePayload("/vapptemplate/metadata.xml", METADATA).acceptMedia(TASK).httpRequestBuilder().build(),
|
||||||
new VcloudHttpResponsePrimer().xmlFilePayload("/task/task.xml", TASK).httpResponseBuilder().build()
|
new VcloudHttpResponsePrimer().xmlFilePayload("/task/task.xml", TASK).httpResponseBuilder().build()
|
||||||
).getVAppTemplateClient();
|
).getVAppTemplateClient();
|
||||||
|
|
||||||
|
@ -425,7 +425,7 @@ public class VAppTemplateClientExpectTest extends VCloudDirectorAdminClientExpec
|
||||||
URI uri = URI.create(endpoint + templateId);
|
URI uri = URI.create(endpoint + templateId);
|
||||||
|
|
||||||
VAppTemplateClient client = orderedRequestsSendResponses(loginRequest, sessionResponse,
|
VAppTemplateClient client = orderedRequestsSendResponses(loginRequest, sessionResponse,
|
||||||
new VcloudHttpRequestPrimer().apiCommand("PUT", templateId + "/metadata").xmlFilePayload("/vapptemplate/metadata.xml", METADATA).acceptMedia(TASK).httpRequestBuilder().build(),
|
new VcloudHttpRequestPrimer().apiCommand("POST", templateId + "/metadata").xmlFilePayload("/vapptemplate/metadata.xml", METADATA).acceptMedia(TASK).httpRequestBuilder().build(),
|
||||||
new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error400.xml", ERROR).httpResponseBuilder().statusCode(400).build()).getVAppTemplateClient();
|
new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error400.xml", ERROR).httpResponseBuilder().statusCode(400).build()).getVAppTemplateClient();
|
||||||
|
|
||||||
client.getMetadataClient().mergeMetadata(uri, exampleMetadata());
|
client.getMetadataClient().mergeMetadata(uri, exampleMetadata());
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class AdminCatalogClientExpectTest extends VCloudDirectorAdminClientExpec
|
||||||
public void testCreateCatalog() {
|
public void testCreateCatalog() {
|
||||||
VCloudDirectorAdminClient client = requestsSendResponses(loginRequest, sessionResponse,
|
VCloudDirectorAdminClient client = requestsSendResponses(loginRequest, sessionResponse,
|
||||||
new VcloudHttpRequestPrimer()
|
new VcloudHttpRequestPrimer()
|
||||||
.apiCommand("POST", "/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0/catalogs")
|
.apiCommand("POST", "/admin/catalog/7212e451-76e1-4631-b2de-ba1dfd8080e4/catalogs")
|
||||||
.xmlFilePayload("/catalog/admin/createCatalogSource.xml", VCloudDirectorMediaType.ADMIN_CATALOG)
|
.xmlFilePayload("/catalog/admin/createCatalogSource.xml", VCloudDirectorMediaType.ADMIN_CATALOG)
|
||||||
.acceptMedia(VCloudDirectorMediaType.ADMIN_CATALOG)
|
.acceptMedia(VCloudDirectorMediaType.ADMIN_CATALOG)
|
||||||
.httpRequestBuilder().build(),
|
.httpRequestBuilder().build(),
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class AdminNetworkClientExpectTest extends VCloudDirectorAdminClientExpec
|
||||||
public void testUpdateNetwork() {
|
public void testUpdateNetwork() {
|
||||||
VCloudDirectorAdminClient client = requestsSendResponses(loginRequest, sessionResponse,
|
VCloudDirectorAdminClient client = requestsSendResponses(loginRequest, sessionResponse,
|
||||||
new VcloudHttpRequestPrimer()
|
new VcloudHttpRequestPrimer()
|
||||||
.apiCommand("GET", "/admin/network/b466c0c5-8a5c-4335-b703-a2e2e6b5f3e1")
|
.apiCommand("PUT", "/admin/network/b466c0c5-8a5c-4335-b703-a2e2e6b5f3e1")
|
||||||
.xmlFilePayload("/network/admin/updateNetworkSource.xml", VCloudDirectorMediaType.ORG_NETWORK)
|
.xmlFilePayload("/network/admin/updateNetworkSource.xml", VCloudDirectorMediaType.ORG_NETWORK)
|
||||||
.acceptMedia(VCloudDirectorMediaType.TASK)
|
.acceptMedia(VCloudDirectorMediaType.TASK)
|
||||||
.httpRequestBuilder().build(),
|
.httpRequestBuilder().build(),
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class UserClientExpectTest extends VCloudDirectorAdminClientExpectTest {
|
||||||
public void testCreateUser() {
|
public void testCreateUser() {
|
||||||
VCloudDirectorAdminClient client = requestsSendResponses(loginRequest, sessionResponse,
|
VCloudDirectorAdminClient client = requestsSendResponses(loginRequest, sessionResponse,
|
||||||
new VcloudHttpRequestPrimer()
|
new VcloudHttpRequestPrimer()
|
||||||
.apiCommand("POST", "/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0/catalogs")
|
.apiCommand("POST", "/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0/users")
|
||||||
.xmlFilePayload("/user/createUserSource.xml", VCloudDirectorMediaType.USER)
|
.xmlFilePayload("/user/createUserSource.xml", VCloudDirectorMediaType.USER)
|
||||||
.acceptMedia(VCloudDirectorMediaType.USER)
|
.acceptMedia(VCloudDirectorMediaType.USER)
|
||||||
.httpRequestBuilder().build(),
|
.httpRequestBuilder().build(),
|
||||||
|
|
Loading…
Reference in New Issue