use of com.sequenceiq.environment.api.v1.proxy.model.response.ProxyResponse in project cloudbreak by hortonworks.
the class ProxyConfigDtoServiceTest method testGetWhenProxyConfigUserPasswordSecretsAreEmpty.
@ParameterizedTest
@MethodSource("invalidUserPasswordSecrets")
void testGetWhenProxyConfigUserPasswordSecretsAreEmpty(SecretResponse user, SecretResponse password) {
String name = "aProxyConfig";
String host = "https://test.cloudera.com";
Integer port = 8443;
ProxyResponse proxyResponse = new ProxyResponse();
proxyResponse.setName(name);
proxyResponse.setHost(host);
proxyResponse.setPort(port);
proxyResponse.setUserName(user);
proxyResponse.setPassword(password);
when(regionAwareInternalCrnGenerator.getInternalCrnForServiceAsString()).thenReturn("crn");
when(regionAwareInternalCrnGeneratorFactory.iam()).thenReturn(regionAwareInternalCrnGenerator);
when(environmentServiceCrnClient.withCrn(anyString()).proxyV1Endpoint()).thenReturn(proxyEndpoint);
when(proxyEndpoint.getByResourceCrn(anyString())).thenReturn(proxyResponse);
ProxyConfig proxyConfig = underTest.getByCrn("crn:cdp:environments:us-west-1:cloudera:proxyconfig:a2f0bee2-059e-433f-a9d0-2893c53419ad");
assertFalse(proxyConfig.getProxyAuthentication().isPresent());
}
Aggregations