use of com.sequenceiq.freeipa.api.v1.kerberos.model.create.ActiveDirectoryKerberosDescriptor in project cloudbreak by hortonworks.
the class CreateKerberosConfigRequestToKerberosConfigConverterTest method testAdWithoutName.
@Test
public void testAdWithoutName() {
CreateKerberosConfigRequest request = new CreateKerberosConfigRequest();
request.setActiveDirectory(new ActiveDirectoryKerberosDescriptor());
BadRequestException ex = Assertions.assertThrows(BadRequestException.class, () -> {
underTest.convert(request);
});
assertEquals(IMPROPER_KERBEROS_MESSAGE, ex.getMessage());
}
use of com.sequenceiq.freeipa.api.v1.kerberos.model.create.ActiveDirectoryKerberosDescriptor in project cloudbreak by hortonworks.
the class CreateKerberosConfigRequestToKerberosConfigConverterTest method testInvalid.
@Test
public void testInvalid() {
CreateKerberosConfigRequest request = new CreateKerberosConfigRequest();
request.setActiveDirectory(new ActiveDirectoryKerberosDescriptor());
request.setMit(new MITKerberosDescriptor());
BadRequestException ex = Assertions.assertThrows(BadRequestException.class, () -> {
underTest.convert(request);
});
assertEquals(IMPROPER_KERBEROS_MESSAGE, ex.getMessage());
}
use of com.sequenceiq.freeipa.api.v1.kerberos.model.create.ActiveDirectoryKerberosDescriptor in project cloudbreak by hortonworks.
the class CreateKerberosConfigRequestToKerberosConfigConverterTest method createActiveDirectoryKerberosDescriptor.
private ActiveDirectoryKerberosDescriptor createActiveDirectoryKerberosDescriptor(boolean withDomain) {
ActiveDirectoryKerberosDescriptor adDescriptor = new ActiveDirectoryKerberosDescriptor();
setupCommonFields(adDescriptor);
adDescriptor.setAdminUrl(ADMIN_URL);
adDescriptor.setContainerDn(CONTAINER_DN);
adDescriptor.setLdapUrl(LDAP_URL);
adDescriptor.setRealm(REALM);
adDescriptor.setUrl(URL);
if (withDomain) {
adDescriptor.setDomain(DOMAIN);
}
return adDescriptor;
}
use of com.sequenceiq.freeipa.api.v1.kerberos.model.create.ActiveDirectoryKerberosDescriptor in project cloudbreak by hortonworks.
the class CreateKerberosConfigRequestToKerberosConfigConverterTest method testAdWithoutDomain.
@Test
public void testAdWithoutDomain() {
CreateKerberosConfigRequest request = new CreateKerberosConfigRequest();
ActiveDirectoryKerberosDescriptor adDescriptor = createActiveDirectoryKerberosDescriptor(false);
request.setActiveDirectory(adDescriptor);
request.setName(NAME);
KerberosConfig kerberosConfig = underTest.convert(request);
checkActiveDirectoryParams(kerberosConfig, false);
}
use of com.sequenceiq.freeipa.api.v1.kerberos.model.create.ActiveDirectoryKerberosDescriptor in project cloudbreak by hortonworks.
the class CreateKerberosConfigRequestToKerberosConfigConverterTest method testAd.
@Test
public void testAd() {
CreateKerberosConfigRequest request = new CreateKerberosConfigRequest();
ActiveDirectoryKerberosDescriptor adDescriptor = createActiveDirectoryKerberosDescriptor(true);
request.setActiveDirectory(adDescriptor);
request.setName(NAME);
KerberosConfig kerberosConfig = underTest.convert(request);
checkActiveDirectoryParams(kerberosConfig, true);
}
Aggregations