-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KOGITO-9158 Used RestWorkItemHandler as HTTP client in Knative custom…
… function Signed-off-by: Helber Belmiro <[email protected]>
- Loading branch information
Showing
34 changed files
with
1,280 additions
and
985 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
136 changes: 136 additions & 0 deletions
136
quarkus/addons/knative/serving/integration-tests/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.kie.kogito</groupId> | ||
<artifactId>kogito-addons-quarkus-knative-serving-parent</artifactId> | ||
<version>2.0.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>kogito-addons-quarkus-knative-serving-integration-tests</artifactId> | ||
<name>Kogito Add-On Knative Serving - Integration Tests</name> | ||
<description>Knative Serving Kogito Add-On Integration Tests.</description> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.kie.kogito</groupId> | ||
<artifactId>kogito-quarkus-bom</artifactId> | ||
<version>${project.version}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-smallrye-openapi</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.kie.kogito</groupId> | ||
<artifactId>kogito-quarkus-serverless-workflow</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-resteasy</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-resteasy-jackson</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.kie.kogito</groupId> | ||
<artifactId>kogito-addons-quarkus-knative-serving</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.kie.kogito</groupId> | ||
<artifactId>kogito-addons-quarkus-kubernetes</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.kie.kogito</groupId> | ||
<artifactId>kogito-addons-quarkus-fabric8-kubernetes-service-catalog</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-kubernetes</artifactId> | ||
</dependency> | ||
|
||
<!-- Test --> | ||
<dependency> | ||
<groupId>org.assertj</groupId> | ||
<artifactId>assertj-core</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-junit5</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.rest-assured</groupId> | ||
<artifactId>rest-assured</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.github.tomakehurst</groupId> | ||
<artifactId>wiremock-jre8</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-test-kubernetes-client</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.kie.kogito</groupId> | ||
<artifactId>kogito-addons-quarkus-fabric8-kubernetes-service-catalog-test-utils</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-maven-plugin</artifactId> | ||
<configuration> | ||
<noDeps>true</noDeps> | ||
<skip>${skipTests}</skip> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>build</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<profiles> | ||
<profile> | ||
<id>native</id> | ||
<activation> | ||
<property> | ||
<name>native</name> | ||
</property> | ||
</activation> | ||
<properties> | ||
<quarkus.package.type>native</quarkus.package.type> | ||
</properties> | ||
</profile> | ||
</profiles> | ||
</project> |
34 changes: 34 additions & 0 deletions
34
.../addons/knative/serving/integration-tests/src/main/resources/arrayKnativeFunction.sw.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"id": "arrayKnativeFunction", | ||
"version": "1.0", | ||
"name": "Test Knative function", | ||
"description": "This workflow tests a Knative function", | ||
"start": "invokeFunction", | ||
"functions": [ | ||
{ | ||
"name": "greet", | ||
"type": "custom", | ||
"operation": "knative:services.v1.serving.knative.dev/default/serverless-workflow-greeting-quarkus?path=/arrayFunction" | ||
} | ||
], | ||
"states": [ | ||
{ | ||
"name": "invokeFunction", | ||
"type": "operation", | ||
"actions": [ | ||
{ | ||
"functionRef": { | ||
"refName": "greet", | ||
"arguments": { | ||
"array": [ | ||
"Javierito", | ||
"Pepito" | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"end": true | ||
} | ||
] | ||
} |
38 changes: 38 additions & 0 deletions
38
...ns/knative/serving/integration-tests/src/main/resources/cloudEventKnativeFunction.sw.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"id": "cloudEvent", | ||
"version": "1.0", | ||
"name": "Test Knative function", | ||
"description": "This workflow tests a Knative function", | ||
"start": "invokeFunction", | ||
"functions": [ | ||
{ | ||
"name": "greet", | ||
"type": "custom", | ||
"operation": "knative:services.v1.serving.knative.dev/default/serverless-workflow-greeting-quarkus?asCloudEvent=true&path=/cloud-event" | ||
} | ||
], | ||
"states": [ | ||
{ | ||
"name": "invokeFunction", | ||
"type": "operation", | ||
"actions": [ | ||
{ | ||
"functionRef": { | ||
"refName": "greet", | ||
"arguments": { | ||
"specversion": "1.0", | ||
"id": "42", | ||
"source": "https://localhost:8080", | ||
"type": "org.kie.kogito.test", | ||
"data": { | ||
"org": "Acme", | ||
"project": "Kogito" | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"end": true | ||
} | ||
] | ||
} |
Oops, something went wrong.