mirror of https://github.com/apache/jclouds.git
fix headers using primer approach
This commit is contained in:
parent
fb625864ac
commit
8891dcf280
|
@ -148,8 +148,13 @@ public class NetworkClientExpectTest extends BaseVCloudDirectorRestClientExpectT
|
|||
URI networkUri = URI.create(endpoint + "/network/55a677cf-ab3f-48ae-b880-fab90421980c");
|
||||
|
||||
VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse,
|
||||
getStandardRequest("GET", "/network/55a677cf-ab3f-48ae-b880-fab90421980c/metadata"),
|
||||
getStandardPayloadResponse("/network/metadata.xml", VCloudDirectorMediaType.METADATA));
|
||||
new VcloudHttpRequestPrimer()
|
||||
.apiCommand("GET", "/network/55a677cf-ab3f-48ae-b880-fab90421980c/metadata")
|
||||
.acceptAnyMedia()
|
||||
.httpRequestBuilder().build(),
|
||||
new VcloudHttpResponsePrimer()
|
||||
.xmlFilePayload("/network/metadata.xml", VCloudDirectorMediaType.METADATA)
|
||||
.httpResponseBuilder().build());
|
||||
|
||||
Metadata expected = Metadata.builder()
|
||||
.type("application/vnd.vmware.vcloud.metadata+xml")
|
||||
|
|
|
@ -179,8 +179,13 @@ public class OrgClientExpectTest extends BaseVCloudDirectorRestClientExpectTest
|
|||
URI orgUri = URI.create(endpoint + "/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0");
|
||||
|
||||
VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse,
|
||||
getStandardRequest("GET", "/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0/metadata"),
|
||||
getStandardPayloadResponse("/org/orgMetadata.xml", VCloudDirectorMediaType.METADATA));
|
||||
new VcloudHttpRequestPrimer()
|
||||
.apiCommand("GET", "/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0/metadata")
|
||||
.acceptAnyMedia()
|
||||
.httpRequestBuilder().build(),
|
||||
new VcloudHttpResponsePrimer()
|
||||
.xmlFilePayload("/org/orgMetadata.xml", VCloudDirectorMediaType.METADATA)
|
||||
.httpResponseBuilder().build());
|
||||
|
||||
Metadata expected = Metadata.builder()
|
||||
.type("application/vnd.vmware.vcloud.metadata+xml")
|
||||
|
@ -203,8 +208,13 @@ public class OrgClientExpectTest extends BaseVCloudDirectorRestClientExpectTest
|
|||
URI orgUri = URI.create("https://vcloudbeta.bluelock.com/api/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0");
|
||||
|
||||
VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse,
|
||||
getStandardRequest("GET", "/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0/metadata/KEY"),
|
||||
getStandardPayloadResponse("/org/orgMetadataValue.xml", VCloudDirectorMediaType.METADATA_VALUE));
|
||||
new VcloudHttpRequestPrimer()
|
||||
.apiCommand("GET", "/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0/metadata/KEY")
|
||||
.acceptAnyMedia()
|
||||
.httpRequestBuilder().build(),
|
||||
new VcloudHttpResponsePrimer()
|
||||
.xmlFilePayload("/org/orgMetadataValue.xml", VCloudDirectorMediaType.METADATA_VALUE)
|
||||
.httpResponseBuilder().build());
|
||||
|
||||
MetadataValue expected = metadataValue();
|
||||
|
||||
|
|
Loading…
Reference in New Issue