Search in sources :

Example 6 with CcmV2JumpgateParameters

use of com.sequenceiq.cloudbreak.ccm.cloudinit.CcmV2JumpgateParameters in project cloudbreak by hortonworks.

the class CcmParametersConfigServiceTest method testParamsWithOneWayTls.

@Test
void testParamsWithOneWayTls() {
    when(entitlementService.ccmV2UseOneWayTls(ACCOUNT)).thenReturn(true);
    CcmV2JumpgateParameters params = createParams();
    Map<String, SaltPillarProperties> result = underTest.createCcmParametersPillarConfig(ACCOUNT, params);
    assertThat(result).containsKey("ccm_jumpgate");
    Map<String, Object> properties = result.get("ccm_jumpgate").getProperties();
    assertThat(properties).containsKey("ccm_jumpgate");
    Map<String, Object> ccmParameterMap = (Map<String, Object>) properties.get("ccm_jumpgate");
    assertThat(ccmParameterMap).containsOnly(Map.entry("inverting_proxy_certificate", INVERTING_PROXY_CERTIFICATE), Map.entry("inverting_proxy_host", INVERTING_PROXY_HOST), Map.entry("agent_certificate", AGENT_CERT), Map.entry("agent_enciphered_key", PRIVATE_KEY), Map.entry("agent_key_id", AGENT_KEY_ID), Map.entry("agent_backend_id_prefix", params.getAgentBackendIdPrefix()), Map.entry("environment_crn", ENV_CRN), Map.entry("agent_access_key_id", MACHINE_USER_ACCESS_KEY), Map.entry("agent_enciphered_access_key", MACHINE_USER_PRIVATE_KEY));
}
Also used : DefaultCcmV2JumpgateParameters(com.sequenceiq.cloudbreak.ccm.cloudinit.DefaultCcmV2JumpgateParameters) CcmV2JumpgateParameters(com.sequenceiq.cloudbreak.ccm.cloudinit.CcmV2JumpgateParameters) Map(java.util.Map) SaltPillarProperties(com.sequenceiq.cloudbreak.orchestrator.model.SaltPillarProperties) Test(org.junit.jupiter.api.Test)

Aggregations

CcmV2JumpgateParameters (com.sequenceiq.cloudbreak.ccm.cloudinit.CcmV2JumpgateParameters)6 DefaultCcmV2JumpgateParameters (com.sequenceiq.cloudbreak.ccm.cloudinit.DefaultCcmV2JumpgateParameters)4 CcmConnectivityParameters (com.sequenceiq.cloudbreak.ccm.cloudinit.CcmConnectivityParameters)3 SaltPillarProperties (com.sequenceiq.cloudbreak.orchestrator.model.SaltPillarProperties)2 Map (java.util.Map)2 Test (org.junit.jupiter.api.Test)2 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)2 InvertingProxy (com.cloudera.thunderhead.service.clusterconnectivitymanagementv2.ClusterConnectivityManagementV2Proto.InvertingProxy)1 InvertingProxyAgent (com.cloudera.thunderhead.service.clusterconnectivitymanagementv2.ClusterConnectivityManagementV2Proto.InvertingProxyAgent)1 PlatformParameters (com.sequenceiq.cloudbreak.cloud.PlatformParameters)1 ScriptParams (com.sequenceiq.cloudbreak.cloud.model.ScriptParams)1 InstanceGroupType (com.sequenceiq.common.api.type.InstanceGroupType)1 Optional (java.util.Optional)1 Test (org.junit.Test)1 DisplayName (org.junit.jupiter.api.DisplayName)1 MethodSource (org.junit.jupiter.params.provider.MethodSource)1 ValueSource (org.junit.jupiter.params.provider.ValueSource)1 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)1