use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.cluster.gateway.GatewayV4Request in project cloudbreak by hortonworks.
the class ClusterRequestToGatewayConverterTest method testConvertSsoType.
@Test
public void testConvertSsoType() {
GatewayV4Request source = new GatewayV4Request();
source.setTopologies(getTopologies());
Gateway result = underTest.convert(source);
assertEquals(SSOType.NONE, result.getSsoType());
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.cluster.gateway.GatewayV4Request in project cloudbreak by hortonworks.
the class ClusterRequestToGatewayConverterTest method testConvertBasicProperties.
@Test
public void testConvertBasicProperties() {
GatewayV4Request source = new GatewayV4Request();
source.setPath(PATH);
source.setSsoProvider(SSO_PROVIDER);
source.setSsoType(SSOType.SSO_PROVIDER);
source.setTokenCert(TOKEN_CERT);
source.setGatewayType(GatewayType.CENTRAL);
source.setTopologies(getTopologies());
Gateway result = underTest.convert(source);
assertEquals(SSOType.SSO_PROVIDER, result.getSsoType());
assertEquals(TOKEN_CERT, result.getTokenCert());
assertEquals(GatewayType.CENTRAL, result.getGatewayType());
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.cluster.gateway.GatewayV4Request in project cloudbreak by hortonworks.
the class ClusterRequestToGatewayConverterTest method testWithEnableFalseAndDefinedTopologyInList.
@Test
public void testWithEnableFalseAndDefinedTopologyInList() {
GatewayV4Request source = new GatewayV4Request();
source.setTopologies(getTopologies());
Gateway result = underTest.convert(source);
assertNotNull(result);
assertEquals("topologyName", result.getTopologies().iterator().next().getTopologyName());
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.cluster.gateway.GatewayV4Request in project cloudbreak by hortonworks.
the class GatewayManifesterTest method getGatewayV4Request.
private GatewayV4Request getGatewayV4Request() {
GatewayV4Request gatewayV4Request = new GatewayV4Request();
GatewayTopologyV4Request gatewayTopologyV4Request = new GatewayTopologyV4Request();
gatewayTopologyV4Request.setTopologyName("soo-deep");
gatewayTopologyV4Request.setExposedServices(List.of("ALL"));
gatewayV4Request.setSsoType(SSOType.SSO_PROVIDER);
gatewayV4Request.setTopologies(List.of(gatewayTopologyV4Request));
return gatewayV4Request;
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.cluster.gateway.GatewayV4Request in project cloudbreak by hortonworks.
the class GatewayManifesterTest method prepareGatewayWhenRequestedHasValueForGatewayShouldReturnWithoutModifications.
@Test
void prepareGatewayWhenRequestedHasValueForGatewayShouldReturnWithoutModifications() {
GatewayV4Request gatewayV4Request = getGatewayV4Request();
StackV4Request stackV4Request = new StackV4Request();
stackV4Request.setCluster(new ClusterV4Request());
stackV4Request.getCluster().setGateway(gatewayV4Request);
underTest.configureGatewayForSdxCluster(stackV4Request);
isTrue(stackV4Request.getCluster().getGateway().equals(gatewayV4Request));
}
Aggregations