Search in sources :

Example 36 with StartupEvent

use of io.quarkus.runtime.StartupEvent in project kogito-apps by kiegroup.

the class ProtobufServiceTest method onStart.

@Test
void onStart() {
    String content = getTestFileContent();
    kogitoDescriptors.addProtoFile("test", content);
    StartupEvent event = mock(StartupEvent.class);
    protobufService.onStart(event);
    verify(schemaEvent).fire(eq(new SchemaRegisteredEvent(new SchemaDescriptor("test", content, getValidEntityIndexDescriptors(true), null), SCHEMA_TYPE)));
    verify(protobufMonitorService).startMonitoring();
}
Also used : SchemaDescriptor(org.kie.kogito.persistence.api.schema.SchemaDescriptor) StartupEvent(io.quarkus.runtime.StartupEvent) SchemaRegisteredEvent(org.kie.kogito.persistence.api.schema.SchemaRegisteredEvent) 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