use of com.sequenceiq.freeipa.api.v1.kerberos.model.create.CreateKerberosConfigRequest in project cloudbreak by hortonworks.
the class KerberosConfigTest method testClusterCreationWithValidKerberos.
@Test(dataProvider = "dataProviderForTest")
public void testClusterCreationWithValidKerberos(MockedTestContext testContext, String blueprintName, KerberosTestData testData, @Description TestCaseDescription testCaseDescription) {
CreateKerberosConfigRequest request = testData.getRequest();
request.setName(extendNameWithGeneratedPart(request.getName()));
testContext.given("master", InstanceGroupTestDto.class).withHostGroup(HostGroupType.MASTER).withNodeCount(1).given(ClusterTestDto.class).given(StackTestDto.class).withInstanceGroupsEntity(InstanceGroupTestDto.defaultHostGroup(testContext)).when(stackTestClient.createV4()).enableVerification().await(STACK_AVAILABLE).mockSalt().run().post().bodyContains(SALT_HIGHSTATE, 1).atLeast(1).verify().mockCm().cmImportClusterTemplate().post().atLeast(1).verify().validate();
}
use of com.sequenceiq.freeipa.api.v1.kerberos.model.create.CreateKerberosConfigRequest 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.CreateKerberosConfigRequest in project cloudbreak by hortonworks.
the class CreateKerberosConfigRequestToKerberosConfigConverterTest method testFreeIpa.
@Test
public void testFreeIpa() {
CreateKerberosConfigRequest request = new CreateKerberosConfigRequest();
request.setFreeIpa(createFreeIpaDescriptor(true));
request.setName(NAME);
KerberosConfig kerberosConfig = underTest.convert(request);
checkFreeIpaParams(kerberosConfig, true);
}
use of com.sequenceiq.freeipa.api.v1.kerberos.model.create.CreateKerberosConfigRequest 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.CreateKerberosConfigRequest 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);
}
Aggregations