use of com.sequenceiq.environment.api.v1.proxy.model.request.ProxyRequest in project cloudbreak by hortonworks.
the class ProxyConfigAuthValidatorTest method testProxyConfigWithInvalidUserPwd.
@ParameterizedTest
@MethodSource("invalidUserPasswords")
public void testProxyConfigWithInvalidUserPwd(String user, String password) {
ProxyRequest proxyRequest = new ProxyRequest();
proxyRequest.setUserName(user);
proxyRequest.setPassword(password);
Assert.assertFalse(underTest.isValid(proxyRequest, null));
}
use of com.sequenceiq.environment.api.v1.proxy.model.request.ProxyRequest in project cloudbreak by hortonworks.
the class ProxyConfigAuthValidatorTest method testValidProxyConfigWithoutAuth.
@Test
public void testValidProxyConfigWithoutAuth() {
ProxyRequest proxyRequest = new ProxyRequest();
Assert.assertTrue(underTest.isValid(proxyRequest, null));
}
use of com.sequenceiq.environment.api.v1.proxy.model.request.ProxyRequest in project cloudbreak by hortonworks.
the class ProxyTestSource method getProxyRequest.
public static ProxyRequest getProxyRequest() {
ProxyRequest result = new ProxyRequest();
result.setDescription(DESCRIPTION);
result.setName(NAME);
result.setUserName(USERNAME);
result.setPassword(PASSWORD);
result.setHost(SERVER_HOST);
result.setPort(SERVER_PORT);
result.setProtocol(PROTOCOL);
result.setNoProxyHosts(NO_PROXY_HOSTS);
return result;
}
use of com.sequenceiq.environment.api.v1.proxy.model.request.ProxyRequest in project cloudbreak by hortonworks.
the class ProxyRequestToProxyConfigConverterTest method testConvertEmptyPassword.
@ParameterizedTest
@MethodSource("invalidUserPasswords")
void testConvertEmptyPassword(String password) {
ProxyRequest request = ProxyTestSource.getProxyRequest();
request.setPassword(password);
Assertions.assertNull(convert(request).getPassword());
}
use of com.sequenceiq.environment.api.v1.proxy.model.request.ProxyRequest in project cloudbreak by hortonworks.
the class ProxyRequestToProxyConfigConverterTest method testConvertEmptyUser.
@ParameterizedTest
@MethodSource("invalidUserPasswords")
void testConvertEmptyUser(String user) {
ProxyRequest request = ProxyTestSource.getProxyRequest();
request.setUserName(user);
Assertions.assertNull(convert(request).getUserName());
}
Aggregations