Search in sources :

Example 16 with StartupEvent

use of io.quarkus.runtime.StartupEvent in project AD482-apps by RedHatTraining.

the class TransformTemperature method onStart.

void onStart(@Observes StartupEvent startupEvent) {
    StreamsBuilder builder = new StreamsBuilder();
    ObjectMapperSerde<TemperatureWasMeasuredInCelsius> temperaturesEventSerde = new ObjectMapperSerde<>(TemperatureWasMeasuredInCelsius.class);
    ObjectMapperSerde<TemperatureWasTransformed> temperaturesTransformedEventSerde = new ObjectMapperSerde<>(TemperatureWasTransformed.class);
    KStream<String, TemperatureWasMeasuredInCelsius> stream = builder.stream(TEMPERATURES_TOPIC, Consumed.with(Serdes.String(), temperaturesEventSerde));
    stream.map((key, measure) -> {
        LOGGER.infov("Transforming {0}ºC to ºF...", measure.measure);
        // Simulate a slow calculation
        try {
            Thread.sleep(CALCULATION_DELAY);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        Double fahrenheit = ((double) measure.measure * 9 / 5) + 32;
        LOGGER.infov("Temp. transformed {0}ºC -> {1}ºF (ID: {2})", measure.measure, fahrenheit, measure.locationId);
        return new KeyValue<>(measure.locationId, new TemperatureWasTransformed(measure.locationId, measure.measure, fahrenheit));
    }).to(MEASURED_TEMPERATURES_TOPIC, Produced.with(Serdes.Integer(), temperaturesTransformedEventSerde));
    streams = new KafkaStreams(builder.build(), generateStreamConfig());
    streams.start();
}
Also used : StreamsBuilder(org.apache.kafka.streams.StreamsBuilder) Produces(javax.enterprise.inject.Produces) Produced(org.apache.kafka.streams.kstream.Produced) TemperatureWasTransformed(com.redhat.monitor.event.TemperatureWasTransformed) Consumed(org.apache.kafka.streams.kstream.Consumed) Logger(org.jboss.logging.Logger) KeyValue(org.apache.kafka.streams.KeyValue) ShutdownEvent(io.quarkus.runtime.ShutdownEvent) KStream(org.apache.kafka.streams.kstream.KStream) ObjectMapperSerde(io.quarkus.kafka.client.serialization.ObjectMapperSerde) TemperatureWasMeasuredInCelsius(com.redhat.monitor.event.TemperatureWasMeasuredInCelsius) Observes(javax.enterprise.event.Observes) Serdes(org.apache.kafka.common.serialization.Serdes) ApplicationScoped(javax.enterprise.context.ApplicationScoped) StartupEvent(io.quarkus.runtime.StartupEvent) KafkaStreams(org.apache.kafka.streams.KafkaStreams) TemperatureWasMeasuredInCelsius(com.redhat.monitor.event.TemperatureWasMeasuredInCelsius) KafkaStreams(org.apache.kafka.streams.KafkaStreams) TemperatureWasTransformed(com.redhat.monitor.event.TemperatureWasTransformed) StreamsBuilder(org.apache.kafka.streams.StreamsBuilder) ObjectMapperSerde(io.quarkus.kafka.client.serialization.ObjectMapperSerde)

Example 17 with StartupEvent

use of io.quarkus.runtime.StartupEvent in project entando-k8s-controller-coordinator by entando-k8s.

the class LivenessTests method shouldCreateControllerPodPointingToResource.

@Test
@Description("Should create a  controller pod that points to the newly created resource")
void shouldCreateControllerPodPointingToResource() {
    System.setProperty(EntandoOperatorSpiConfigProperty.ENTANDO_CONTROLLER_POD_NAME.getJvmSystemProperty(), "my-pod");
    step("Given the Coordinator observes its own namespace", () -> {
        System.setProperty(EntandoOperatorConfigProperty.ENTANDO_NAMESPACES_TO_OBSERVE.getJvmSystemProperty(), clientDouble.getNamespace());
        coordinator.onStartup(new StartupEvent());
    });
    ValueHolder<SerializedEntandoResource> testResource = new ValueHolder<>();
    step("And I have created a new TestResource resource", () -> {
        final TestResource r = new TestResource().withNames(clientDouble.getNamespace(), "test-keycloak").withSpec(new BasicDeploymentSpecBuilder().withDbms(DbmsVendor.EMBEDDED).build());
        r.getMetadata().setGeneration(1L);
        testResource.set(clientDouble.createOrPatchEntandoResource(CoordinatorTestUtils.toSerializedResource(r)));
        attachment("TestResource", objectMapper.writeValueAsString(testResource.get()));
    });
    final File file = Paths.get("/tmp/EntandoControllerCoordinator.ready").toFile();
    clientDouble.getCluster().getResourceProcessor().getAllWatchers().forEach(watcher -> {
        Liveness.alive();
        step(format("When the watcher %s is closed", watcher.getClass().getSimpleName()), () -> {
            watcher.onClose(new WatcherException("Closed"));
        });
        step("Then the liveness probe will fail", () -> {
            assertThat(file).doesNotExist();
        });
    });
}
Also used : SerializedEntandoResource(org.entando.kubernetes.controller.spi.client.SerializedEntandoResource) StartupEvent(io.quarkus.runtime.StartupEvent) TestResource(org.entando.kubernetes.fluentspi.TestResource) ValueHolder(org.entando.kubernetes.test.common.ValueHolder) BasicDeploymentSpecBuilder(org.entando.kubernetes.fluentspi.BasicDeploymentSpecBuilder) File(java.io.File) WatcherException(io.fabric8.kubernetes.client.WatcherException) Description(io.qameta.allure.Description) Test(org.junit.jupiter.api.Test)

Example 18 with StartupEvent

use of io.quarkus.runtime.StartupEvent in project entando-k8s-controller-coordinator by entando-k8s.

the class ControllerCoordinatorProcessingCriteriaTest method testGenerationObservedIsCurrentButForceInstructed.

@Test
@Description("Resource modification events should be processed when using the annotation 'entando.org/processing-instruction=force' even " + "when the 'generation' property on the metadata of the resource is the same as the 'observedGeneration' property on" + " its status")
void testGenerationObservedIsCurrentButForceInstructed() {
    step("Given the Coordinator observes this namespace", () -> System.setProperty(EntandoOperatorConfigProperty.ENTANDO_NAMESPACES_TO_OBSERVE.getJvmSystemProperty(), OBSERVED_NAMESPACE));
    final ValueHolder<SerializedEntandoResource> testResource = new ValueHolder<>();
    step("And I have created an TestResource resource with the 'force' processing instruction", () -> {
        testResource.set(createTestResource(10L, Collections.singletonMap(AnnotationNames.PROCESSING_INSTRUCTION.getName(), "force")));
        attachment("TestResource", objectMapper.writeValueAsString(testResource.get()));
    });
    step("And the generation in the metadata is the same as the observedGeneration in the status", () -> {
        // NB This step assumes that the ClientDouble is holding this exact instance of the resource when the ControllerCoordinator
        // starts
        testResource.get().getStatus().updateDeploymentPhase(EntandoDeploymentPhase.STARTED, 10L);
        attachment("TestResource", objectMapper.writeValueAsString(testResource.get()));
    });
    step("When I start the ControllerCoordinator", () -> coordinator.onStartup(new StartupEvent()));
    step("Then a new pod gets created", () -> {
        coordinator.getObserver(CustomResourceDefinitionContext.fromCustomResourceType(TestResource.class)).shutDownAndWait(1, SECONDS);
        await().ignoreExceptions().atMost(3, TimeUnit.SECONDS).until(() -> {
            final Map<String, String> labels = labelsFromResource(testResource.get());
            return clientDouble.loadPod(CONTROLLER_NAMESPACE, labels) != null;
        });
    });
    step("And the 'force' processing instruction has been removed to avoid recursive processing", () -> {
        final SerializedEntandoResource latestKeycloakServer = clientDouble.load(TestResource.class, testResource.get().getMetadata().getNamespace(), testResource.get().getMetadata().getName());
        assertThat(CoordinatorUtils.resolveProcessingInstruction(latestKeycloakServer)).isEqualTo(OperatorProcessingInstruction.NONE);
        attachment("TestResource", objectMapper.writeValueAsString(testResource.get()));
    });
    step("And the forced event was logged", () -> {
        final Optional<String> logEntry = LogInterceptor.getLogEntries().stream().filter(s -> s.contains("has been forced")).findFirst();
        assertThat(logEntry).isPresent();
    });
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) Allure.attachment(io.qameta.allure.Allure.attachment) SerializedEntandoResource(org.entando.kubernetes.controller.spi.client.SerializedEntandoResource) DbmsVendor(org.entando.kubernetes.model.common.DbmsVendor) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) TimeoutException(java.util.concurrent.TimeoutException) Action(io.fabric8.kubernetes.client.Watcher.Action) ValueHolder(org.entando.kubernetes.test.common.ValueHolder) CustomResourceDefinitionContext(io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext) EntandoOperatorConfigProperty(org.entando.kubernetes.controller.support.common.EntandoOperatorConfigProperty) Feature(io.qameta.allure.Feature) LabelNames(org.entando.kubernetes.controller.spi.common.LabelNames) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) LogInterceptor(org.entando.kubernetes.test.common.LogInterceptor) Map(java.util.Map) YAMLFactory(com.fasterxml.jackson.dataformat.yaml.YAMLFactory) ResourceUtils(org.entando.kubernetes.controller.spi.common.ResourceUtils) Tag(org.junit.jupiter.api.Tag) Issue(io.qameta.allure.Issue) CoordinatorTestUtils(org.entando.kubernetes.controller.coordinator.common.CoordinatorTestUtils) BasicDeploymentSpecBuilder(org.entando.kubernetes.fluentspi.BasicDeploymentSpecBuilder) ObjectMetaBuilder(io.fabric8.kubernetes.api.model.ObjectMetaBuilder) SimpleKubernetesClientDouble(org.entando.kubernetes.controller.coordinator.common.SimpleKubernetesClientDouble) CommonLabels(org.entando.kubernetes.test.common.CommonLabels) FluentIntegrationTesting(org.entando.kubernetes.controller.support.client.impl.integrationtesthelpers.FluentIntegrationTesting) MockitoExtension(org.mockito.junit.jupiter.MockitoExtension) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Pod(io.fabric8.kubernetes.api.model.Pod) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) IOException(java.io.IOException) CustomResourceDefinitionBuilder(io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinitionBuilder) StandardCapability(org.entando.kubernetes.model.capability.StandardCapability) TestResource(org.entando.kubernetes.fluentspi.TestResource) TimeUnit(java.util.concurrent.TimeUnit) Test(org.junit.jupiter.api.Test) EntandoResourceClientDouble(org.entando.kubernetes.controller.support.client.doubles.EntandoResourceClientDouble) AfterEach(org.junit.jupiter.api.AfterEach) Allure.step(io.qameta.allure.Allure.step) ProvidedCapabilityBuilder(org.entando.kubernetes.model.capability.ProvidedCapabilityBuilder) Optional(java.util.Optional) Tags(org.junit.jupiter.api.Tags) RandomStringUtils(org.apache.commons.lang3.RandomStringUtils) StartupEvent(io.quarkus.runtime.StartupEvent) Description(io.qameta.allure.Description) Collections(java.util.Collections) CustomResourceDefinition(io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinition) EntandoDeploymentPhase(org.entando.kubernetes.model.common.EntandoDeploymentPhase) SerializedEntandoResource(org.entando.kubernetes.controller.spi.client.SerializedEntandoResource) StartupEvent(io.quarkus.runtime.StartupEvent) ValueHolder(org.entando.kubernetes.test.common.ValueHolder) Description(io.qameta.allure.Description) Test(org.junit.jupiter.api.Test)

Example 19 with StartupEvent

use of io.quarkus.runtime.StartupEvent in project entando-k8s-controller-coordinator by entando-k8s.

the class ControllerCoordinatorProcessingCriteriaTest method testIgnoredWhenOwnedByResourceOfInterest.

@Test
@Description("Resources should be ignored when they are owned by other resources of interest")
void testIgnoredWhenOwnedByResourceOfInterest() {
    step("Given  the Coordinator observes this namespace", () -> System.setProperty(EntandoOperatorConfigProperty.ENTANDO_NAMESPACES_TO_OBSERVE.getJvmSystemProperty(), OBSERVED_NAMESPACE));
    ValueHolder<SerializedEntandoResource> owningResource = new ValueHolder<>();
    step("And I have created another resource of interest, a ProvidedCapability", () -> {
        owningResource.set(clientDouble.createOrPatchEntandoResource(CoordinatorTestUtils.toSerializedResource(new ProvidedCapabilityBuilder().withNewMetadata().withName("my-capability").withNamespace(OBSERVED_NAMESPACE).endMetadata().withNewSpec().withCapability(StandardCapability.DBMS).endSpec().build())));
        attachment("CapabilityResource", objectMapper.writeValueAsString(owningResource.get()));
    });
    ValueHolder<SerializedEntandoResource> testResource = new ValueHolder<>();
    step("And I have created an TestResource resource that is owned by another resource of interest", () -> {
        testResource.set(createTestResource(1L, Collections.emptyMap()));
        testResource.get().getMetadata().getOwnerReferences().add(ResourceUtils.buildOwnerReference(owningResource.get()));
        clientDouble.createOrPatchEntandoResource(testResource.get());
    });
    step("when I start the ControllerCoordinator", () -> coordinator.onStartup(new StartupEvent()));
    step("Then a new pod gets created for the owning resource", () -> {
        await().ignoreExceptions().atMost(10, SECONDS).until(() -> clientDouble.loadPod(CONTROLLER_NAMESPACE, labelsFromResource(owningResource.get())) != null);
        attachment("Controller Pod", objectMapper.writeValueAsString(clientDouble.loadPod(CONTROLLER_NAMESPACE, labelsFromResource(owningResource.get()))));
    });
    step("Then no new pod gets created for the owned resource", () -> {
        assertThat(clientDouble.loadPod(CONTROLLER_NAMESPACE, labelsFromResource(testResource.get()))).isNull();
    });
    step("And the ignored event was logged", () -> {
        final Optional<String> logEntry = LogInterceptor.getLogEntries().stream().filter(s -> s.contains("is ignored because it is not a top level resource")).findFirst();
        assertThat(logEntry).isPresent();
    });
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) Allure.attachment(io.qameta.allure.Allure.attachment) SerializedEntandoResource(org.entando.kubernetes.controller.spi.client.SerializedEntandoResource) DbmsVendor(org.entando.kubernetes.model.common.DbmsVendor) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) TimeoutException(java.util.concurrent.TimeoutException) Action(io.fabric8.kubernetes.client.Watcher.Action) ValueHolder(org.entando.kubernetes.test.common.ValueHolder) CustomResourceDefinitionContext(io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext) EntandoOperatorConfigProperty(org.entando.kubernetes.controller.support.common.EntandoOperatorConfigProperty) Feature(io.qameta.allure.Feature) LabelNames(org.entando.kubernetes.controller.spi.common.LabelNames) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) LogInterceptor(org.entando.kubernetes.test.common.LogInterceptor) Map(java.util.Map) YAMLFactory(com.fasterxml.jackson.dataformat.yaml.YAMLFactory) ResourceUtils(org.entando.kubernetes.controller.spi.common.ResourceUtils) Tag(org.junit.jupiter.api.Tag) Issue(io.qameta.allure.Issue) CoordinatorTestUtils(org.entando.kubernetes.controller.coordinator.common.CoordinatorTestUtils) BasicDeploymentSpecBuilder(org.entando.kubernetes.fluentspi.BasicDeploymentSpecBuilder) ObjectMetaBuilder(io.fabric8.kubernetes.api.model.ObjectMetaBuilder) SimpleKubernetesClientDouble(org.entando.kubernetes.controller.coordinator.common.SimpleKubernetesClientDouble) CommonLabels(org.entando.kubernetes.test.common.CommonLabels) FluentIntegrationTesting(org.entando.kubernetes.controller.support.client.impl.integrationtesthelpers.FluentIntegrationTesting) MockitoExtension(org.mockito.junit.jupiter.MockitoExtension) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Pod(io.fabric8.kubernetes.api.model.Pod) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) IOException(java.io.IOException) CustomResourceDefinitionBuilder(io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinitionBuilder) StandardCapability(org.entando.kubernetes.model.capability.StandardCapability) TestResource(org.entando.kubernetes.fluentspi.TestResource) TimeUnit(java.util.concurrent.TimeUnit) Test(org.junit.jupiter.api.Test) EntandoResourceClientDouble(org.entando.kubernetes.controller.support.client.doubles.EntandoResourceClientDouble) AfterEach(org.junit.jupiter.api.AfterEach) Allure.step(io.qameta.allure.Allure.step) ProvidedCapabilityBuilder(org.entando.kubernetes.model.capability.ProvidedCapabilityBuilder) Optional(java.util.Optional) Tags(org.junit.jupiter.api.Tags) RandomStringUtils(org.apache.commons.lang3.RandomStringUtils) StartupEvent(io.quarkus.runtime.StartupEvent) Description(io.qameta.allure.Description) Collections(java.util.Collections) CustomResourceDefinition(io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinition) EntandoDeploymentPhase(org.entando.kubernetes.model.common.EntandoDeploymentPhase) SerializedEntandoResource(org.entando.kubernetes.controller.spi.client.SerializedEntandoResource) ProvidedCapabilityBuilder(org.entando.kubernetes.model.capability.ProvidedCapabilityBuilder) StartupEvent(io.quarkus.runtime.StartupEvent) ValueHolder(org.entando.kubernetes.test.common.ValueHolder) Description(io.qameta.allure.Description) Test(org.junit.jupiter.api.Test)

Example 20 with StartupEvent

use of io.quarkus.runtime.StartupEvent in project entando-k8s-controller-coordinator by entando-k8s.

the class ControllerCoordinatorProcessingCriteriaTest method testUpgrade.

@Test
@Description("A resource should be processed again when the ControllerCoordinator starts up if it was processed with a version of the" + " Operator that is now being replaced")
void testUpgrade() {
    step("Given the Coordinator observes this namespace", () -> System.setProperty(EntandoOperatorConfigProperty.ENTANDO_NAMESPACES_TO_OBSERVE.getJvmSystemProperty(), OBSERVED_NAMESPACE));
    step("And the current version of the operator is 6.3.1", () -> System.setProperty(ControllerCoordinatorProperty.ENTANDO_K8S_OPERATOR_VERSION.getJvmSystemProperty(), "6.3.1"));
    step("And the version of the operator to replace was 6.3.0", () -> System.setProperty(ControllerCoordinatorProperty.ENTANDO_K8S_OPERATOR_VERSION_TO_REPLACE.getJvmSystemProperty(), "6.3.0"));
    final ValueHolder<SerializedEntandoResource> testResource = new ValueHolder<>();
    step("And I have created an TestResource resource that was processed by version 6.3.0", () -> testResource.set(createTestResource(10L, Collections.singletonMap(AnnotationNames.PROCESSED_BY_OPERATOR_VERSION.getName(), "6.3.0"))));
    step("And it has been successfully deployed previously", () -> {
        testResource.set(clientDouble.updatePhase(testResource.get(), EntandoDeploymentPhase.SUCCESSFUL));
        attachment("Processed Resource", objectMapper.writeValueAsString(testResource.get()));
    });
    step("When I start the ControllerCoordinator", () -> coordinator.onStartup(new StartupEvent()));
    step("Then a new controller pod is created", () -> {
        await().ignoreExceptions().atMost(3, TimeUnit.SECONDS).until(() -> clientDouble.loadPod(CONTROLLER_NAMESPACE, labelsFromResource(testResource.get())) != null);
        attachment("Controller Pod", objectMapper.writeValueAsString(clientDouble.loadPod(CONTROLLER_NAMESPACE, labelsFromResource(testResource.get()))));
    });
    step("And the resource is marked as having been processed by version 6.3.1 when its deployment succeeds", () -> {
        clientDouble.updatePhase(testResource.get(), EntandoDeploymentPhase.SUCCESSFUL);
        SerializedEntandoResource latestKeycloakServer = clientDouble.load(TestResource.class, testResource.get().getMetadata().getNamespace(), testResource.get().getMetadata().getName());
        assertThat(CoordinatorUtils.resolveAnnotation(latestKeycloakServer, AnnotationNames.PROCESSED_BY_OPERATOR_VERSION)).contains("6.3.1");
    });
    step("And the upgrade event was logged", () -> {
        final Optional<String> logEntry = LogInterceptor.getLogEntries().stream().filter(s -> s.contains("needs to be processed as part of the upgrade to the version")).findFirst();
        assertThat(logEntry).isPresent();
    });
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) Allure.attachment(io.qameta.allure.Allure.attachment) SerializedEntandoResource(org.entando.kubernetes.controller.spi.client.SerializedEntandoResource) DbmsVendor(org.entando.kubernetes.model.common.DbmsVendor) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) TimeoutException(java.util.concurrent.TimeoutException) Action(io.fabric8.kubernetes.client.Watcher.Action) ValueHolder(org.entando.kubernetes.test.common.ValueHolder) CustomResourceDefinitionContext(io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext) EntandoOperatorConfigProperty(org.entando.kubernetes.controller.support.common.EntandoOperatorConfigProperty) Feature(io.qameta.allure.Feature) LabelNames(org.entando.kubernetes.controller.spi.common.LabelNames) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) LogInterceptor(org.entando.kubernetes.test.common.LogInterceptor) Map(java.util.Map) YAMLFactory(com.fasterxml.jackson.dataformat.yaml.YAMLFactory) ResourceUtils(org.entando.kubernetes.controller.spi.common.ResourceUtils) Tag(org.junit.jupiter.api.Tag) Issue(io.qameta.allure.Issue) CoordinatorTestUtils(org.entando.kubernetes.controller.coordinator.common.CoordinatorTestUtils) BasicDeploymentSpecBuilder(org.entando.kubernetes.fluentspi.BasicDeploymentSpecBuilder) ObjectMetaBuilder(io.fabric8.kubernetes.api.model.ObjectMetaBuilder) SimpleKubernetesClientDouble(org.entando.kubernetes.controller.coordinator.common.SimpleKubernetesClientDouble) CommonLabels(org.entando.kubernetes.test.common.CommonLabels) FluentIntegrationTesting(org.entando.kubernetes.controller.support.client.impl.integrationtesthelpers.FluentIntegrationTesting) MockitoExtension(org.mockito.junit.jupiter.MockitoExtension) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Pod(io.fabric8.kubernetes.api.model.Pod) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) IOException(java.io.IOException) CustomResourceDefinitionBuilder(io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinitionBuilder) StandardCapability(org.entando.kubernetes.model.capability.StandardCapability) TestResource(org.entando.kubernetes.fluentspi.TestResource) TimeUnit(java.util.concurrent.TimeUnit) Test(org.junit.jupiter.api.Test) EntandoResourceClientDouble(org.entando.kubernetes.controller.support.client.doubles.EntandoResourceClientDouble) AfterEach(org.junit.jupiter.api.AfterEach) Allure.step(io.qameta.allure.Allure.step) ProvidedCapabilityBuilder(org.entando.kubernetes.model.capability.ProvidedCapabilityBuilder) Optional(java.util.Optional) Tags(org.junit.jupiter.api.Tags) RandomStringUtils(org.apache.commons.lang3.RandomStringUtils) StartupEvent(io.quarkus.runtime.StartupEvent) Description(io.qameta.allure.Description) Collections(java.util.Collections) CustomResourceDefinition(io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinition) EntandoDeploymentPhase(org.entando.kubernetes.model.common.EntandoDeploymentPhase) SerializedEntandoResource(org.entando.kubernetes.controller.spi.client.SerializedEntandoResource) StartupEvent(io.quarkus.runtime.StartupEvent) ValueHolder(org.entando.kubernetes.test.common.ValueHolder) Description(io.qameta.allure.Description) Test(org.junit.jupiter.api.Test)

Aggregations

StartupEvent (io.quarkus.runtime.StartupEvent)36 Test (org.junit.jupiter.api.Test)29 Description (io.qameta.allure.Description)16 SerializedEntandoResource (org.entando.kubernetes.controller.spi.client.SerializedEntandoResource)13 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)12 YAMLFactory (com.fasterxml.jackson.dataformat.yaml.YAMLFactory)12 CustomResourceDefinition (io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinition)12 CustomResourceDefinitionBuilder (io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinitionBuilder)12 ValueHolder (org.entando.kubernetes.test.common.ValueHolder)11 BasicDeploymentSpecBuilder (org.entando.kubernetes.fluentspi.BasicDeploymentSpecBuilder)8 TestResource (org.entando.kubernetes.fluentspi.TestResource)8 ObjectMetaBuilder (io.fabric8.kubernetes.api.model.ObjectMetaBuilder)7 IOException (java.io.IOException)7 ProvidedCapabilityBuilder (org.entando.kubernetes.model.capability.ProvidedCapabilityBuilder)7 Pod (io.fabric8.kubernetes.api.model.Pod)6 CustomResourceDefinitionContext (io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext)5 Allure.attachment (io.qameta.allure.Allure.attachment)5 Allure.step (io.qameta.allure.Allure.step)5 Feature (io.qameta.allure.Feature)5 Issue (io.qameta.allure.Issue)5