Search in sources :

Example 16 with SslConfig

use of com.sequenceiq.redbeams.domain.stack.SslConfig in project cloudbreak by hortonworks.

the class DatabaseServerSslCertificateSyncServiceTest method verifyDbStackCaptured.

private void verifyDbStackCaptured(Integer sslCertificateVersionExpected, Set<Object> sslCertificatesExpected) {
    DBStack dbStackCaptured = dbStackArgumentCaptor.getValue();
    assertThat(dbStackCaptured).isNotNull();
    SslConfig sslConfigCaptured = dbStackCaptured.getSslConfig();
    assertThat(sslConfigCaptured).isNotNull();
    assertThat(sslConfigCaptured.getSslCertificateType()).isEqualTo(SslCertificateType.CLOUD_PROVIDER_OWNED);
    assertThat(sslConfigCaptured.getSslCertificateActiveCloudProviderIdentifier()).isEqualTo(CERT_ID_2);
    assertThat(sslConfigCaptured.getSslCertificateActiveVersion()).isEqualTo(sslCertificateVersionExpected);
    assertThat(sslConfigCaptured.getSslCertificates()).isEqualTo(sslCertificatesExpected);
}
Also used : SslConfig(com.sequenceiq.redbeams.domain.stack.SslConfig) DBStack(com.sequenceiq.redbeams.domain.stack.DBStack)

Aggregations

SslConfig (com.sequenceiq.redbeams.domain.stack.SslConfig)16 DBStack (com.sequenceiq.redbeams.domain.stack.DBStack)6 Test (org.junit.jupiter.api.Test)5 DatabaseServerV4Response (com.sequenceiq.redbeams.api.endpoint.v4.databaseserver.responses.DatabaseServerV4Response)4 SslConfigV4Response (com.sequenceiq.redbeams.api.endpoint.v4.databaseserver.responses.SslConfigV4Response)4 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)4 DatabaseStack (com.sequenceiq.cloudbreak.cloud.model.DatabaseStack)3 DatabaseServerConfig (com.sequenceiq.redbeams.domain.DatabaseServerConfig)3 DatabaseServer (com.sequenceiq.redbeams.domain.stack.DatabaseServer)3 SslCertificateEntry (com.sequenceiq.redbeams.configuration.SslCertificateEntry)2 MethodSource (org.junit.jupiter.params.provider.MethodSource)2 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)2 AuthenticatedContext (com.sequenceiq.cloudbreak.cloud.context.AuthenticatedContext)1 CloudDatabaseServerSslCertificate (com.sequenceiq.cloudbreak.cloud.model.database.CloudDatabaseServerSslCertificate)1 Objects (java.util.Objects)1 Set (java.util.Set)1