From 518c4c01746b905fe058309de48e399154d3b358 Mon Sep 17 00:00:00 2001 From: Christoph Deppisch Date: Tue, 20 Dec 2022 16:01:45 +0100 Subject: [PATCH] chore: Fix AWS DDB sink YAKS tests - Evaluate current project version (e.g. 3.20.0-SNAPSHOT) and replace with version from pull request to fix jitpack dependencies used in Kamelets - Enable integration logger in AWS tests --- .github/workflows/yaks-tests.yaml | 5 +++-- test/aws-ddb-sink/yaks-config.yaml | 5 +++++ test/aws-s3/yaks-config.yaml | 8 ++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/yaks-tests.yaml b/.github/workflows/yaks-tests.yaml index a398b1a7f..2104cefcb 100644 --- a/.github/workflows/yaks-tests.yaml +++ b/.github/workflows/yaks-tests.yaml @@ -57,14 +57,15 @@ 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 diff --git a/test/aws-ddb-sink/yaks-config.yaml b/test/aws-ddb-sink/yaks-config.yaml index 15156f088..0133f0fc4 100644 --- a/test/aws-ddb-sink/yaks-config.yaml +++ b/test/aws-ddb-sink/yaks-config.yaml @@ -41,6 +41,11 @@ 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 diff --git a/test/aws-s3/yaks-config.yaml b/test/aws-s3/yaks-config.yaml index a2831684e..82b291b66 100644 --- a/test/aws-s3/yaks-config.yaml +++ b/test/aws-s3/yaks-config.yaml @@ -49,10 +49,10 @@ 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