Skip to content

Commit

Permalink
chore: Fix YAKS tests
Browse files Browse the repository at this point in the history
- Update to YAKS 0.13.0
- Update Camel K to 1.12.0-nightly
- Fix jitpack dependencies used in Kamelets when running GitHub CI jobs for a PR (evaluate current project version e.g. 3.20.0-SNAPSHOT and replace with version from PR)
- Enable integration logger in YAKS tests (better failure analysis when tests fail)
  • Loading branch information
christophd committed Feb 2, 2023
1 parent 47686e4 commit 44c13ad
Show file tree
Hide file tree
Showing 13 changed files with 104 additions and 38 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/yaks-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ concurrency:
cancel-in-progress: true

env:
CAMEL_K_VERSION: 1.10.3
YAKS_VERSION: 0.11.0
CAMEL_K_VERSION: 1.12.0-nightly
YAKS_VERSION: 0.13.0
YAKS_IMAGE_NAME: "docker.io/citrusframework/yaks"
YAKS_RUN_OPTIONS: "--timeout=15m"

Expand All @@ -57,17 +57,18 @@ jobs:
- name: Set JitPack coordinates for pull requests
if: github.event_name == 'pull_request'
env:
BASE_REF: ${{ github.base_ref }}
HEAD_REF: ${{ github.head_ref }}
HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
run: |
echo "Set JitPack dependency coordinates to ${HEAD_REPO/\//.}:camel-kamelets-utils:${HEAD_REF//\//'~'}-SNAPSHOT"
export PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
# Overwrite JitPack coordinates in the local Kamelets so the tests can use the utility classes in this PR
find kamelets -maxdepth 1 -name '*.kamelet.yaml' -exec sed -i "s/github:apache.camel-kamelets:camel-kamelets-utils:${BASE_REF}-SNAPSHOT/github:${HEAD_REPO/\//.}:camel-kamelets-utils:${HEAD_REF//\//'~'}-SNAPSHOT/g" {} +
find kamelets -maxdepth 1 -name '*.kamelet.yaml' -exec sed -i "s/github:apache.camel-kamelets:camel-kamelets-utils:${PROJECT_VERSION}/github:${HEAD_REPO/\//.}:camel-kamelets-utils:${HEAD_REF//\//'~'}-SNAPSHOT/g" {} +
- name: Get Camel K CLI
run: |
curl --fail -L --silent https://github.com/apache/camel-k/releases/download/v${CAMEL_K_VERSION}/camel-k-client-${CAMEL_K_VERSION}-linux-64bit.tar.gz -o kamel.tar.gz
curl --fail -L --silent https://github.com/apache/camel-k/releases/download/${CAMEL_K_VERSION}/camel-k-client-${CAMEL_K_VERSION}-linux-64bit.tar.gz -o kamel.tar.gz
mkdir -p _kamel
tar -zxf kamel.tar.gz --directory ./_kamel
sudo mv ./_kamel/kamel /usr/local/bin/
Expand Down Expand Up @@ -100,7 +101,7 @@ jobs:
export KAMEL_INSTALL_REGISTRY=$KIND_REGISTRY
export KAMEL_INSTALL_REGISTRY_INSECURE=true
kamel install -w --operator-env-vars KAMEL_INSTALL_DEFAULT_KAMELETS=false
kamel install -w --operator-env-vars KAMEL_INSTALL_DEFAULT_KAMELETS=false --maven-repository=https://repository.apache.org/content/repositories/snapshots@id=apache-snapshots@snapshots
# Install the local kamelets
find kamelets -maxdepth 1 -name '*.kamelet.yaml' -exec kubectl apply -f {} \;
Expand Down
16 changes: 13 additions & 3 deletions test/aws-ddb-sink/yaks-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ config:
value: false
- name: YAKS_TESTCONTAINERS_AUTO_REMOVE_RESOURCES
value: false
- name: YAKS_TESTCONTAINERS_LOCALSTACK_VERSION
value: 1.3.1
- name: CITRUS_TYPE_CONVERTER
value: camel
resources:
Expand All @@ -41,10 +43,18 @@ config:
tags:
- "not @ignored"
settings:
loggers:
- name: INTEGRATION_STATUS
level: INFO
- name: INTEGRATION_LOGS
level: INFO
dependencies:
- groupId: com.amazonaws
artifactId: aws-java-sdk-dynamodb
version: "@aws-java-sdk.version@"
- groupId: software.amazon.awssdk
artifactId: dynamodb
version: "2.18.40"
- groupId: software.amazon.awssdk
artifactId: apache-client
version: "2.18.40"
- groupId: org.apache.camel
artifactId: camel-aws2-ddb
version: "@camel.version@"
Expand Down
19 changes: 12 additions & 7 deletions test/aws-s3/yaks-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ config:
value: false
- name: YAKS_TESTCONTAINERS_AUTO_REMOVE_RESOURCES
value: false
- name: YAKS_TESTCONTAINERS_LOCALSTACK_VERSION
value: 1.3.1
- name: CITRUS_TYPE_CONVERTER
value: camel
resources:
Expand All @@ -49,14 +51,17 @@ config:
- "not @ignored"
settings:
loggers:
- name: Logger.Message_IN
level: DEBUG
- name: Logger.Message_OUT
level: DEBUG
- name: INTEGRATION_STATUS
level: INFO
- name: INTEGRATION_LOGS
level: INFO
dependencies:
- groupId: com.amazonaws
artifactId: aws-java-sdk-kinesis
version: "@aws-java-sdk.version@"
- groupId: software.amazon.awssdk
artifactId: s3
version: "2.18.40"
- groupId: software.amazon.awssdk
artifactId: apache-client
version: "2.18.40"
- groupId: org.apache.camel
artifactId: camel-aws2-s3
version: "@camel.version@"
Expand Down
6 changes: 6 additions & 0 deletions test/earthquake-source/yaks-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ config:
value: false
- name: YAKS_KUBERNETES_AUTO_REMOVE_RESOURCES
value: false
settings:
loggers:
- name: INTEGRATION_STATUS
level: INFO
- name: INTEGRATION_LOGS
level: INFO
dump:
enabled: true
failedOnly: true
Expand Down
16 changes: 13 additions & 3 deletions test/experimental/aws-ddb-sink-exp/yaks-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ config:
value: false
- name: YAKS_TESTCONTAINERS_AUTO_REMOVE_RESOURCES
value: false
- name: YAKS_TESTCONTAINERS_LOCALSTACK_VERSION
value: 1.3.1
- name: CITRUS_TYPE_CONVERTER
value: camel
resources:
Expand All @@ -41,10 +43,18 @@ config:
tags:
- "not @ignored"
settings:
loggers:
- name: INTEGRATION_STATUS
level: INFO
- name: INTEGRATION_LOGS
level: INFO
dependencies:
- groupId: com.amazonaws
artifactId: aws-java-sdk-dynamodb
version: "@aws-java-sdk.version@"
- groupId: software.amazon.awssdk
artifactId: dynamodb
version: "2.18.40"
- groupId: software.amazon.awssdk
artifactId: apache-client
version: "2.18.40"
- groupId: org.apache.camel
artifactId: camel-aws2-ddb
version: "@camel.version@"
Expand Down
19 changes: 12 additions & 7 deletions test/experimental/aws-s3-exp/yaks-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ config:
value: false
- name: YAKS_TESTCONTAINERS_AUTO_REMOVE_RESOURCES
value: false
- name: YAKS_TESTCONTAINERS_LOCALSTACK_VERSION
value: 1.3.1
- name: CITRUS_TYPE_CONVERTER
value: camel
resources:
Expand All @@ -44,14 +46,17 @@ config:
- "not @ignored"
settings:
loggers:
- name: Logger.Message_IN
level: DEBUG
- name: Logger.Message_OUT
level: DEBUG
- name: INTEGRATION_STATUS
level: INFO
- name: INTEGRATION_LOGS
level: INFO
dependencies:
- groupId: com.amazonaws
artifactId: aws-java-sdk-kinesis
version: "@aws-java-sdk.version@"
- groupId: software.amazon.awssdk
artifactId: s3
version: "2.18.40"
- groupId: software.amazon.awssdk
artifactId: apache-client
version: "2.18.40"
- groupId: org.apache.camel
artifactId: camel-aws2-s3
version: "@camel.version@"
Expand Down
6 changes: 6 additions & 0 deletions test/extract-field-action/yaks-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ config:
value: false
- name: YAKS_KUBERNETES_AUTO_REMOVE_RESOURCES
value: false
settings:
loggers:
- name: INTEGRATION_STATUS
level: INFO
- name: INTEGRATION_LOGS
level: INFO
resources:
- extract-field-action-binding.yaml
dump:
Expand Down
6 changes: 6 additions & 0 deletions test/insert-field-action/yaks-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ config:
value: false
- name: YAKS_KUBERNETES_AUTO_REMOVE_RESOURCES
value: false
settings:
loggers:
- name: INTEGRATION_STATUS
level: INFO
- name: INTEGRATION_LOGS
level: INFO
resources:
- insert-field-action-binding.yaml
dump:
Expand Down
6 changes: 6 additions & 0 deletions test/kafka/yaks-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ config:
value: false
- name: CITRUS_TYPE_CONVERTER
value: camel
settings:
loggers:
- name: INTEGRATION_STATUS
level: INFO
- name: INTEGRATION_LOGS
level: INFO
resources:
- kafka-source-test.yaml
- kafka-sink-test.yaml
Expand Down
5 changes: 5 additions & 0 deletions test/mail-sink/yaks-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ config:
- name: YAKS_KUBERNETES_AUTO_REMOVE_RESOURCES
value: false
settings:
loggers:
- name: INTEGRATION_STATUS
level: INFO
- name: INTEGRATION_LOGS
level: INFO
dependencies:
- groupId: com.consol.citrus
artifactId: citrus-mail
Expand Down
6 changes: 6 additions & 0 deletions test/rest-openapi-sink/yaks-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ config:
value: false
- name: YAKS_KUBERNETES_AUTO_REMOVE_RESOURCES
value: false
settings:
loggers:
- name: INTEGRATION_STATUS
level: INFO
- name: INTEGRATION_LOGS
level: INFO
resources:
- pet.json
- openapi.json
Expand Down
18 changes: 6 additions & 12 deletions test/salesforce-sink/yaks-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,17 @@ config:
namespace:
temporary: false
runtime:
settings:
loggers:
- name: root
level: INFO
- name: org.citrusframework.yaks
level: DEBUG
- name: com.consol.citrus
level: INFO
- name: Logger.Message_IN
level: DEBUG
- name: Logger.Message_OUT
level: DEBUG
env:
- name: YAKS_CAMELK_AUTO_REMOVE_RESOURCES
value: false
- name: YAKS_KUBERNETES_AUTO_REMOVE_RESOURCES
value: false
settings:
loggers:
- name: INTEGRATION_STATUS
level: INFO
- name: INTEGRATION_LOGS
level: INFO
secret: salesforce-credentials
resources:
- timer-to-salesforce-binding.yaml
Expand Down
6 changes: 6 additions & 0 deletions test/timer-source/yaks-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ config:
value: false
- name: YAKS_KUBERNETES_AUTO_REMOVE_RESOURCES
value: false
settings:
loggers:
- name: INTEGRATION_STATUS
level: INFO
- name: INTEGRATION_LOGS
level: INFO
dump:
enabled: true
failedOnly: true
Expand Down

0 comments on commit 44c13ad

Please sign in to comment.