use of org.bf2.operator.managers.DrainCleanerManager in project kas-fleetshard by bf2fc6cc711aee1a0c2a.
the class KafkaClusterTest method testDrainCleanerWebhookNotFound.
@Test
void testDrainCleanerWebhookNotFound() throws IOException {
DrainCleanerManager mock = Mockito.mock(DrainCleanerManager.class);
Mockito.when(mock.isDrainCleanerWebhookFound()).thenReturn(false);
QuarkusMock.installMockForType(mock, DrainCleanerManager.class);
ManagedKafka mk = exampleManagedKafka("40Gi");
Kafka kafka = kafkaCluster.kafkaFrom(mk, null);
assertNull(kafka.getSpec().getKafka().getTemplate().getPodDisruptionBudget());
assertNull(kafka.getSpec().getZookeeper().getTemplate().getPodDisruptionBudget());
}
use of org.bf2.operator.managers.DrainCleanerManager in project kas-fleetshard by bf2fc6cc711aee1a0c2a.
the class KafkaClusterTest method testDrainCleanerWebhookFound.
@Test
void testDrainCleanerWebhookFound() throws IOException {
DrainCleanerManager mock = Mockito.mock(DrainCleanerManager.class);
Mockito.when(mock.isDrainCleanerWebhookFound()).thenReturn(true);
QuarkusMock.installMockForType(mock, DrainCleanerManager.class);
ManagedKafka mk = exampleManagedKafka("40Gi");
Kafka kafka = kafkaCluster.kafkaFrom(mk, null);
assertEquals(0, kafka.getSpec().getKafka().getTemplate().getPodDisruptionBudget().getMaxUnavailable());
assertEquals(0, kafka.getSpec().getZookeeper().getTemplate().getPodDisruptionBudget().getMaxUnavailable());
}
Aggregations