本文整理汇总了Java中org.springframework.cloud.servicebroker.model.CreateServiceInstanceAppBindingResponse类的典型用法代码示例。如果您正苦于以下问题:Java CreateServiceInstanceAppBindingResponse类的具体用法?Java CreateServiceInstanceAppBindingResponse怎么用?Java CreateServiceInstanceAppBindingResponse使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CreateServiceInstanceAppBindingResponse类属于org.springframework.cloud.servicebroker.model包,在下文中一共展示了CreateServiceInstanceAppBindingResponse类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: should_proxy_create_service_instance_binding_request_to_filtered_broker
import org.springframework.cloud.servicebroker.model.CreateServiceInstanceAppBindingResponse; //导入依赖的package包/类
@Test
public void should_proxy_create_service_instance_binding_request_to_filtered_broker() throws Exception {
CreateServiceInstanceBindingRequest request = new CreateServiceInstanceBindingRequest()
.withServiceInstanceId("instance_id")
.withBindingId("binding_id");
ResponseEntity<CreateServiceInstanceAppBindingResponse> response = new ResponseEntity<CreateServiceInstanceAppBindingResponse>(new CreateServiceInstanceAppBindingResponse(), HttpStatus.CREATED);
given(this.serviceInstanceBindingServiceClient.createServiceInstanceBinding("instance_id", "binding_id", request))
.willReturn(response);
final ResponseEntity<CreateServiceInstanceAppBindingResponse> forEntity = this.restTemplate.getForEntity("/v2/service_instances/{instance_id}/service_bindings/{binding_id}",
CreateServiceInstanceAppBindingResponse.class, "instance_id", "binding_id");
Assert.assertEquals(response.getBody(), forEntity);
}
开发者ID:orange-cloudfoundry,项目名称:sec-group-broker-filter,代码行数:17,代码来源:ServiceInstanceBindingFilterBrokerIntegrationTest.java
示例2: givenBoundedAppExists
import org.springframework.cloud.servicebroker.model.CreateServiceInstanceAppBindingResponse; //导入依赖的package包/类
@Test(expected = ClientV2Exception.class)
public void fail_to_create_create_security_group_should_raise_exception_so_that_CC_requests_unbinding_action_to_clean_up_target_broker_related_resources() throws Exception {
givenBoundedAppExists(this.cloudFoundryClient, "app_guid");
givenServicePlan(this.cloudFoundryClient, "plan-id", "service-id");
givenService(this.cloudFoundryClient, "service-id", "service-broker-id");
givenServiceBroker(this.cloudFoundryClient, "service-broker-id", "service-broker-name");
givenServiceInstance(this.cloudFoundryClient, "service-instance-id", "service-instance-name", "plan-id");
givenCreateSecurityGroupsFails(this.cloudFoundryClient, "test-securitygroup-name");
Map<String, Object> credentials = new HashMap<>();
credentials.put("uri", TEST_URI);
Map<String, Object> bindResources = new HashMap<>();
bindResources.put(ServiceBindingResource.BIND_RESOURCE_KEY_APP.toString(), "app_guid");
createSecurityGroup
.run(
new CreateServiceInstanceBindingRequest("service-id", "plan-id", null, bindResources, null)
.withBindingId("test-securitygroup-name")
.withServiceInstanceId("service-instance-id"),
new CreateServiceInstanceAppBindingResponse().withCredentials(credentials)
);
}
开发者ID:orange-cloudfoundry,项目名称:sec-group-broker-filter,代码行数:24,代码来源:CreateSecurityGroupTest.java
示例3: createBindingToAppWithExistingSucceeds
import org.springframework.cloud.servicebroker.model.CreateServiceInstanceAppBindingResponse; //导入依赖的package包/类
@Test
public void createBindingToAppWithExistingSucceeds() throws Exception {
CreateServiceInstanceAppBindingResponse createResponse =
ServiceInstanceBindingFixture.buildCreateAppBindingResponse(true);
when(serviceInstanceBindingService.createServiceInstanceBinding(eq(createRequest)))
.thenReturn(createResponse);
setupCatalogService(createRequest.getServiceDefinitionId());
mockMvc.perform(put(buildCreateUrl(false))
.content(DataFixture.toJson(createRequest))
.accept(MediaType.APPLICATION_JSON)
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk())
.andExpect(jsonPath("$.credentials.uri", is(createResponse.getCredentials().get("uri"))))
.andExpect(jsonPath("$.credentials.username", is(createResponse.getCredentials().get("username"))))
.andExpect(jsonPath("$.credentials.password", is(createResponse.getCredentials().get("password"))))
.andExpect(jsonPath("$.syslog_drain_url").doesNotExist())
.andExpect(jsonPath("$.volume_mounts").doesNotExist())
.andExpect(jsonPath("$.route_service_url").doesNotExist());
}
开发者ID:spring-cloud,项目名称:spring-cloud-cloudfoundry-service-broker,代码行数:23,代码来源:ServiceInstanceBindingControllerIntegrationTest.java
示例4: createBindingWithSyslogDrainUrlSucceeds
import org.springframework.cloud.servicebroker.model.CreateServiceInstanceAppBindingResponse; //导入依赖的package包/类
@Test
public void createBindingWithSyslogDrainUrlSucceeds() throws Exception {
CreateServiceInstanceAppBindingResponse response =
ServiceInstanceBindingFixture.buildCreateAppBindingResponseWithSyslog();
when(serviceInstanceBindingService.createServiceInstanceBinding(eq(createRequest)))
.thenReturn(response);
setupCatalogService(createRequest.getServiceDefinitionId());
mockMvc.perform(put(buildCreateUrl(false))
.content(DataFixture.toJson(createRequest))
.accept(MediaType.APPLICATION_JSON)
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isCreated())
.andExpect(jsonPath("$.credentials.uri", is(response.getCredentials().get("uri"))))
.andExpect(jsonPath("$.credentials.username", is(response.getCredentials().get("username"))))
.andExpect(jsonPath("$.credentials.password", is(response.getCredentials().get("password"))))
.andExpect(jsonPath("$.syslog_drain_url", is(response.getSyslogDrainUrl())))
.andExpect(jsonPath("$.volume_mounts").doesNotExist())
.andExpect(jsonPath("$.route_service_url").doesNotExist());
}
开发者ID:spring-cloud,项目名称:spring-cloud-cloudfoundry-service-broker,代码行数:22,代码来源:ServiceInstanceBindingControllerIntegrationTest.java
示例5: createBindingWithVolumeSucceeds
import org.springframework.cloud.servicebroker.model.CreateServiceInstanceAppBindingResponse; //导入依赖的package包/类
@Test
public void createBindingWithVolumeSucceeds() throws Exception {
CreateServiceInstanceBindingRequest request = createRequest;
CreateServiceInstanceAppBindingResponse response = ServiceInstanceBindingFixture.buildCreateAppBindingResponseWithVolumeMount();
when(serviceInstanceBindingService.createServiceInstanceBinding(eq(request)))
.thenReturn(response);
VolumeMount volumeMount = response.getVolumeMounts().get(0);
SharedVolumeDevice device = (SharedVolumeDevice) volumeMount.getDevice();
setupCatalogService(request.getServiceDefinitionId());
mockMvc.perform(put(buildCreateUrl(false))
.content(DataFixture.toJson(request))
.accept(MediaType.APPLICATION_JSON)
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isCreated())
.andExpect(jsonPath("$.credentials").doesNotExist())
.andExpect(jsonPath("$.syslog_drain_url").doesNotExist())
.andExpect(jsonPath("$.volume_mounts[0].driver", is(volumeMount.getDriver())))
.andExpect(jsonPath("$.volume_mounts[0].container_dir", is(volumeMount.getContainerDir())))
.andExpect(jsonPath("$.volume_mounts[0].mode", is(volumeMount.getMode().toString())))
.andExpect(jsonPath("$.volume_mounts[0].device_type", is(volumeMount.getDeviceType().toString())))
.andExpect(jsonPath("$.volume_mounts[0].device.volume_id", is(device.getVolumeId())))
.andExpect(jsonPath("$.volume_mounts[0].device.mount_config", is(device.getMountConfig())));
}
开发者ID:spring-cloud,项目名称:spring-cloud-cloudfoundry-service-broker,代码行数:26,代码来源:ServiceInstanceBindingControllerIntegrationTest.java
示例6: createBindingWithUnknownServiceDefinitionIdSucceeds
import org.springframework.cloud.servicebroker.model.CreateServiceInstanceAppBindingResponse; //导入依赖的package包/类
@Test
public void createBindingWithUnknownServiceDefinitionIdSucceeds() throws Exception {
CreateServiceInstanceAppBindingResponse createResponse =
ServiceInstanceBindingFixture.buildCreateAppBindingResponse(false);
when(serviceInstanceBindingService.createServiceInstanceBinding(eq(createRequest)))
.thenReturn(createResponse);
when(catalogService.getServiceDefinition(eq(createRequest.getServiceDefinitionId())))
.thenReturn(null);
mockMvc.perform(put(buildCreateUrl(false))
.content(DataFixture.toJson(createRequest))
.accept(MediaType.APPLICATION_JSON)
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isCreated());
}
开发者ID:spring-cloud,项目名称:spring-cloud-cloudfoundry-service-broker,代码行数:18,代码来源:ServiceInstanceBindingControllerIntegrationTest.java
示例7: createServiceInstanceBinding
import org.springframework.cloud.servicebroker.model.CreateServiceInstanceAppBindingResponse; //导入依赖的package包/类
@Override
public CreateServiceInstanceBindingResponse createServiceInstanceBinding(final CreateServiceInstanceBindingRequest request) {
final String bindingId = request.getBindingId();
final String serviceInstanceId = request.getServiceInstanceId();
ServiceInstanceBinding binding = bindingRepository.findOne(bindingId);
if (binding != null) {
throw new ServiceInstanceBindingExistsException(serviceInstanceId, bindingId);
}
ServiceInstance instance = instanceRepository.findOne(serviceInstanceId);
if (instance == null) {
throw new CloudKarafkaServiceException("Instance don't exist :" + serviceInstanceId);
}
final Map<String, Object> credentials = new HashMap<String, Object>(){
{
put("brokers", instance.getCloudKarafkaBrokers());
put("ca", instance.getCloudKarafkaCa());
put("cert", instance.getCloudKarafkaCert());
put("id", instance.getCloudKarafkaId());
put("private_key", instance.getCloudKarafkaPrivateKey());
put("topic_prefix", instance.getCloudKarafkaTopicPrefix());
put("brokers",instance.getCloudKarafkaBrokers());
put("message",instance.getCloudKarafkaMessage());
}};
binding = new ServiceInstanceBinding(bindingId, serviceInstanceId, credentials, null, request.getBoundAppGuid());
bindingRepository.save(binding);
return new CreateServiceInstanceAppBindingResponse().withCredentials(credentials);
}
开发者ID:ipolyzos,项目名称:cloudkarafka-broker,代码行数:33,代码来源:CloudKarafkaServiceInstanceBindingService.java
示例8: createServiceInstanceBinding
import org.springframework.cloud.servicebroker.model.CreateServiceInstanceAppBindingResponse; //导入依赖的package包/类
@Override
public CreateServiceInstanceBindingResponse createServiceInstanceBinding(CreateServiceInstanceBindingRequest request) {
String bindingId = request.getBindingId();
String serviceInstanceId = request.getServiceInstanceId();
ServiceInstanceBinding binding = bindingRepository.findOne(bindingId);
if (binding != null) {
throw new ServiceInstanceBindingExistsException(serviceInstanceId, bindingId);
}
String database = serviceInstanceId;
String username = bindingId;
// TODO Password Generator
String password = "password";
// TODO check if user already exists in the DB
mongo.createUser(database, username, password);
Map<String, Object> credentials =
Collections.singletonMap("uri", (Object) mongo.getConnectionString(database, username, password));
binding = new ServiceInstanceBinding(bindingId, serviceInstanceId, credentials, null, request.getBoundAppGuid());
bindingRepository.save(binding);
return new CreateServiceInstanceAppBindingResponse().withCredentials(credentials);
}
开发者ID:cf-platform-eng,项目名称:mongodb-broker,代码行数:29,代码来源:MongoServiceInstanceBindingService.java
示例9: newServiceInstanceBindingCreatedSuccessfully
import org.springframework.cloud.servicebroker.model.CreateServiceInstanceAppBindingResponse; //导入依赖的package包/类
@Test
public void newServiceInstanceBindingCreatedSuccessfully() throws Exception {
when(repository.findOne(any(String.class))).thenReturn(null);
//when(mongo.createUser(any(String.class), any(String.class), any(String.class))).thenReturn(true);
CreateServiceInstanceAppBindingResponse response =
(CreateServiceInstanceAppBindingResponse) service.createServiceInstanceBinding(buildCreateRequest());
assertNotNull(response);
assertNotNull(response.getCredentials());
assertNull(response.getSyslogDrainUrl());
verify(repository).save(isA(ServiceInstanceBinding.class));
}
开发者ID:cf-platform-eng,项目名称:mongodb-broker,代码行数:16,代码来源:MongoServiceInstanceBindingServiceTest.java
示例10: createServiceInstanceBinding
import org.springframework.cloud.servicebroker.model.CreateServiceInstanceAppBindingResponse; //导入依赖的package包/类
@Override
public CreateServiceInstanceBindingResponse createServiceInstanceBinding(CreateServiceInstanceBindingRequest request) {
preBinding(request);
final CreateServiceInstanceBindingRequest req = mapper.map(request);
final ResponseEntity<CreateServiceInstanceAppBindingResponse> response = client.createServiceInstanceBinding(req.getServiceInstanceId(), req.getBindingId(), req);
postBinding(request, response.getBody());
return response.getBody();
}
开发者ID:orange-cloudfoundry,项目名称:sec-group-broker-filter,代码行数:9,代码来源:ServiceInstanceBindingServiceProxy.java
示例11: should_fail_to_create_service_instance_instance_when_any_post_filter_fails
import org.springframework.cloud.servicebroker.model.CreateServiceInstanceAppBindingResponse; //导入依赖的package包/类
@Test
public void should_fail_to_create_service_instance_instance_when_any_post_filter_fails() throws Exception {
Mockito.when(client.createServiceInstanceBinding("instance_id", "binding_id", createServiceInstanceBindingRequest()))
.thenReturn(created());
Mockito.doThrow(new RuntimeException("filter failed"))
.when(filterRunner).postBind(createServiceInstanceBindingRequest(), new CreateServiceInstanceAppBindingResponse());
this.thrown.expect(RuntimeException.class);
this.thrown.expectMessage("filter failed");
serviceInstanceBindingServiceProxy.createServiceInstanceBinding(createServiceInstanceBindingRequest());
}
开发者ID:orange-cloudfoundry,项目名称:sec-group-broker-filter,代码行数:13,代码来源:ServiceInstanceBindingServiceProxyTest.java
示例12: run
import org.springframework.cloud.servicebroker.model.CreateServiceInstanceAppBindingResponse; //导入依赖的package包/类
@Override
public void run(CreateServiceInstanceBindingRequest request, CreateServiceInstanceAppBindingResponse response) {
Assert.notNull(response);
Assert.notNull(response.getCredentials());
final Destination destination = ConnectionInfoFactory.fromCredentials(response.getCredentials());
if (!trustedDestinationSpecification.isSatisfiedBy(destination)) {
log.warn("Cannot open security group for destination {}. Destination is out of allowed range [{}].", destination, trustedDestinationSpecification);
throw new NotAllowedDestination(destination);
}
log.debug("creating security group for credentials {}.", response.getCredentials());
try {
final SecurityGroupEntity securityGroup = Mono.when(
getRuleDescription(cloudFoundryClient, request.getBindingId(), request.getServiceInstanceId()),
getSpaceId(cloudFoundryClient, request.getBoundAppGuid())
).then(function((description, spaceId) -> create(getSecurityGroupName(request), destination, description, spaceId)))
.doOnError(t -> log.error("Fail to create security group. Error details {}", t))
.block();
log.debug("Security Group {} created", securityGroup.getName());
} catch (Exception e) {
log.error("Fail to create Security Group. Error details {}", e);
ReflectionUtils.rethrowRuntimeException(e);
}
}
开发者ID:orange-cloudfoundry,项目名称:sec-group-broker-filter,代码行数:28,代码来源:CreateSecurityGroup.java
示例13: should_create_security_group
import org.springframework.cloud.servicebroker.model.CreateServiceInstanceAppBindingResponse; //导入依赖的package包/类
@Test
public void should_create_security_group() throws Exception {
givenBoundedAppExists(this.cloudFoundryClient, "app_guid");
givenServicePlan(this.cloudFoundryClient, "plan-id", "service-id");
givenService(this.cloudFoundryClient, "service-id", "service-broker-id");
givenServiceBroker(this.cloudFoundryClient, "service-broker-id", "service-broker-name");
givenServiceInstance(this.cloudFoundryClient, "service-instance-id", "service-instance-name", "plan-id");
givenCreateSecurityGroupsSucceeds(this.cloudFoundryClient, "test-securitygroup-name");
Map<String, Object> credentials = new HashMap<>();
credentials.put("uri", TEST_URI);
Map<String, Object> bindResources = new HashMap<>();
bindResources.put(ServiceBindingResource.BIND_RESOURCE_KEY_APP.toString(), "app_guid");
createSecurityGroup
.run(
new CreateServiceInstanceBindingRequest("service-id", "plan-id", null, bindResources, null)
.withBindingId("test-securitygroup-name")
.withServiceInstanceId("service-instance-id"),
new CreateServiceInstanceAppBindingResponse().withCredentials(credentials)
);
Mockito.verify(cloudFoundryClient.securityGroups())
.create(CreateSecurityGroupRequest.builder()
.name("test-securitygroup-name")
.spaceId("space_id")
.rule(RuleEntity.builder()
.description(RULE_DESCRIPTION)
.protocol(Protocol.TCP)
.ports("3306")
.destination("127.0.0.1")
.build())
.build());
}
开发者ID:orange-cloudfoundry,项目名称:sec-group-broker-filter,代码行数:37,代码来源:CreateSecurityGroupTest.java
示例14: should_block_until_create_security_group_returns
import org.springframework.cloud.servicebroker.model.CreateServiceInstanceAppBindingResponse; //导入依赖的package包/类
@Test(expected = ClientV2Exception.class)
public void should_block_until_create_security_group_returns() throws Exception {
givenBoundedAppExists(this.cloudFoundryClient, "app_guid");
givenServicePlan(this.cloudFoundryClient, "plan-id", "service-id");
givenService(this.cloudFoundryClient, "service-id", "service-broker-id");
givenServiceBroker(this.cloudFoundryClient, "service-broker-id", "service-broker-name");
givenServiceInstance(this.cloudFoundryClient, "service-instance-id", "service-instance-name", "plan-id");
givenCreateSecurityGroupsFailsWithDelay(this.cloudFoundryClient, "test-securitygroup-name");
Map<String, Object> credentials = new HashMap<>();
credentials.put("uri", TEST_URI);
Map<String, Object> bindResources = new HashMap<>();
bindResources.put(ServiceBindingResource.BIND_RESOURCE_KEY_APP.toString(), "app_guid");
createSecurityGroup
.run(
new CreateServiceInstanceBindingRequest("service-id", "plan-id", null, bindResources, null)
.withBindingId("test-securitygroup-name")
.withServiceInstanceId("service-instance-id"),
new CreateServiceInstanceAppBindingResponse().withCredentials(credentials)
);
Mockito.verify(cloudFoundryClient.securityGroups())
.create(CreateSecurityGroupRequest.builder()
.name("test-securitygroup-name")
.spaceId("space_id")
.rule(RuleEntity.builder()
.description(RULE_DESCRIPTION)
.protocol(Protocol.TCP)
.ports("3306")
.destination("127.0.0.1")
.build())
.build());
}
开发者ID:orange-cloudfoundry,项目名称:sec-group-broker-filter,代码行数:35,代码来源:CreateSecurityGroupTest.java
示例15: noHostname
import org.springframework.cloud.servicebroker.model.CreateServiceInstanceAppBindingResponse; //导入依赖的package包/类
@Test(expected = IllegalArgumentException.class)
public void noHostname() throws Exception {
CreateServiceInstanceBindingRequest request = new CreateServiceInstanceBindingRequest(null, null, "app_guid", null, null);
Map<String, Object> credentials = new HashMap<>();
credentials.put("uri", NO_HOST_URI);
CreateServiceInstanceAppBindingResponse response = new CreateServiceInstanceAppBindingResponse().withCredentials(credentials);
createSecurityGroup.run(request, response);
}
开发者ID:orange-cloudfoundry,项目名称:sec-group-broker-filter,代码行数:10,代码来源:CreateSecurityGroupTest.java
示例16: noPort
import org.springframework.cloud.servicebroker.model.CreateServiceInstanceAppBindingResponse; //导入依赖的package包/类
@Test(expected = IllegalArgumentException.class)
public void noPort() throws Exception {
CreateServiceInstanceBindingRequest request = new CreateServiceInstanceBindingRequest(null, null, "app_guid", null, null);
Map<String, Object> credentials = new HashMap<>();
credentials.put("uri", NO_PORT_URI);
CreateServiceInstanceAppBindingResponse response = new CreateServiceInstanceAppBindingResponse().withCredentials(credentials);
createSecurityGroup.run(request, response);
}
开发者ID:orange-cloudfoundry,项目名称:sec-group-broker-filter,代码行数:10,代码来源:CreateSecurityGroupTest.java
示例17: create_service_binding_with_static_syslog_drain_url_set_at_service_level
import org.springframework.cloud.servicebroker.model.CreateServiceInstanceAppBindingResponse; //导入依赖的package包/类
@Test
public void create_service_binding_with_static_syslog_drain_url_set_at_service_level() throws Exception {
given().syslog_drain_url_set_in_catalog(service_broker_properties_with_syslog_drain_url_at_service_level_with_requires_field_set());
when().cloud_controller_requests_to_create_a_service_instance_binding_for_plan_id("dev-id");
then().it_should_be_returned_with_syslog_drain_url(new CreateServiceInstanceAppBindingResponse()
.withSyslogDrainUrl("syslog://log.example.com:5000")
.withCredentials(Collections.unmodifiableMap(Stream.of(
new AbstractMap.SimpleEntry<>("URI", "http://my-api.org"))
.collect(Collectors.toMap((e) -> e.getKey(), (e) -> e.getValue())))));
}
开发者ID:orange-cloudfoundry,项目名称:static-creds-broker,代码行数:11,代码来源:CreateLogDrainServiceBindingTest.java
示例18: create_service_binding_with_static_syslog_drain_url_set_at_service_plan_level
import org.springframework.cloud.servicebroker.model.CreateServiceInstanceAppBindingResponse; //导入依赖的package包/类
@Test
public void create_service_binding_with_static_syslog_drain_url_set_at_service_plan_level() throws Exception {
given().syslog_drain_url_set_in_catalog(service_broker_properties_with_syslog_drain_url_at_service_plan_level_with_requires_field_set());
when().cloud_controller_requests_to_create_a_service_instance_binding_for_plan_id("dev-id");
then().it_should_be_returned_with_syslog_drain_url(new CreateServiceInstanceAppBindingResponse()
.withSyslogDrainUrl("syslog://log.dev.com:5000")
.withCredentials(Collections.unmodifiableMap(Stream.of(
new AbstractMap.SimpleEntry<>("URI", "http://my-api.org"))
.collect(Collectors.toMap((e) -> e.getKey(), (e) -> e.getValue())))));
}
开发者ID:orange-cloudfoundry,项目名称:static-creds-broker,代码行数:11,代码来源:CreateLogDrainServiceBindingTest.java
示例19: create_volume_service_binding_with_volume_mount_set_for_all_service_plans
import org.springframework.cloud.servicebroker.model.CreateServiceInstanceAppBindingResponse; //导入依赖的package包/类
@Test
public void create_volume_service_binding_with_volume_mount_set_for_all_service_plans() throws Exception {
given().catalog_with_volume_mount(catalog_with_same_volume_mount_for_all_service_plans());
when().cloud_controller_requests_to_create_a_service_instance_binding_for_plan_id("dev-id");
then().it_should_be_returned_with_volume_mount(new CreateServiceInstanceAppBindingResponse()
.withCredentials(uriCredentials())
.withVolumeMounts(Arrays.asList(expectedNfsv3SharedVolumeMount())));
}
开发者ID:orange-cloudfoundry,项目名称:static-creds-broker,代码行数:9,代码来源:CreateServiceInstanceVolumeBindingTest.java
示例20: create_volume_service_binding_with_volume_mount_set_for_a_service_plan
import org.springframework.cloud.servicebroker.model.CreateServiceInstanceAppBindingResponse; //导入依赖的package包/类
@Test
public void create_volume_service_binding_with_volume_mount_set_for_a_service_plan() throws Exception {
given().catalog_with_volume_mount(catalog_with_volume_mount_set_for_a_service_plan());
when().cloud_controller_requests_to_create_a_service_instance_binding_for_plan_id("dev-id");
then().it_should_be_returned_with_volume_mount(new CreateServiceInstanceAppBindingResponse()
.withCredentials(uriCredentials())
.withVolumeMounts(Arrays.asList(expectedNfsv3SharedVolumeMount())));
}
开发者ID:orange-cloudfoundry,项目名称:static-creds-broker,代码行数:9,代码来源:CreateServiceInstanceVolumeBindingTest.java
注:本文中的org.springframework.cloud.servicebroker.model.CreateServiceInstanceAppBindingResponse类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论