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));
}
Aggregations