diff --git a/.github/tests/change-entry-test.sh b/.github/tests/change-entry-test.sh deleted file mode 100644 index bb20643f..00000000 --- a/.github/tests/change-entry-test.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -# Define the target directory path -target_dir="../../it" - -# Check if the target directory exists -if [ ! -d "$target_dir" ]; then - echo "Error: The target directory '$target_dir' does not exist." - exit 1 -fi - -# Change to the target directory -cd "$target_dir" || exit - -bash change-entry-client-test.sh 1 diff --git a/.github/tests/restore-entry-test.sh b/.github/tests/restore-entry-test.sh deleted file mode 100644 index f9854bbd..00000000 --- a/.github/tests/restore-entry-test.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -# Define the target directory path -target_dir="../../it" - -# Check if the target directory exists -if [ ! -d "$target_dir" ]; then - echo "Error: The target directory '$target_dir' does not exist." - exit 1 -fi - -# Change to the target directory -cd "$target_dir" || exit - -bash change-entry-client-test.sh diff --git a/.github/tests/run-go-test.sh b/.github/tests/run-go-test.sh deleted file mode 100644 index f8736981..00000000 --- a/.github/tests/run-go-test.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# Define the target directory path -target_dir="../../it" - -# Check if the target directory exists -if [ ! -d "$target_dir" ]; then - echo "Error: The target directory '$target_dir' does not exist." - exit 1 -fi - -# Change to the target directory -cd "$target_dir" || exit - -bash run-go-test.sh 0 0 -bash run-go-test.sh 1 1 diff --git a/.github/tests/run-mysql-test.sh b/.github/tests/run-mysql-test.sh deleted file mode 100644 index 3bdabf89..00000000 --- a/.github/tests/run-mysql-test.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# Define the target directory path -target_dir="../../it" - -# Check if the target directory exists -if [ ! -d "$target_dir" ]; then - echo "Error: The target directory '$target_dir' does not exist." - exit 1 -fi - -# Change to the target directory -cd "$target_dir" || exit - -bash run-mysql-test.sh client 0 -bash run-mysql-test.sh fail 1 diff --git a/.github/tests/run-postgres-test.sh b/.github/tests/run-postgres-test.sh deleted file mode 100644 index b73c8227..00000000 --- a/.github/tests/run-postgres-test.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# Define the target directory path -target_dir="../../it" - -# Check if the target directory exists -if [ ! -d "$target_dir" ]; then - echo "Error: The target directory '$target_dir' does not exist." - exit 1 -fi - -# Change to the target directory -cd "$target_dir" || exit - -bash run-postgres-test.sh client 0 -bash run-postgres-test.sh fail 1 diff --git a/.github/workflows/pr_build.yaml b/.github/workflows/pr_build.yaml index d38b41c2..1b92be5b 100644 --- a/.github/workflows/pr_build.yaml +++ b/.github/workflows/pr_build.yaml @@ -89,51 +89,19 @@ jobs: - name: Run clean check run: make git-clean-check - build-matrix: - name: Build matrix - runs-on: ubuntu-22.04 - - needs: [lint] - - steps: - - name: Checkout - uses: actions/checkout@v3.5.3 - - - id: set-matrix - name: Collect all tests - run: | - tests="$(find .github/tests -maxdepth 1 -type f -name '*.sh' -exec basename {} \; | sort | uniq)" - tests_json="$(echo "$tests" | jq -c --slurp --raw-input 'split("\n") | map(select(. != ""))')" - echo "tests=$tests_json" >> $GITHUB_OUTPUT - echo "Collected tests: $tests_json" - - outputs: - tests: ${{ steps.set-matrix.outputs.tests }} - - integration-tests: runs-on: ubuntu-22.04 - needs: [build-matrix] - permissions: - contents: read + steps: - uses: actions/checkout@v3 - name: Build containers run: ./build.sh shell: bash working-directory: ./it - - name: Run tests - run: | - tests_array="$(echo '${{ needs.build-matrix.outputs.tests }}' | jq -r '.[]')" - echo "Tests array: $tests_array" - # Convert the JSON string to an array using jq - - for test in $tests_array; do - echo "Running test: $test" - bash "${test}" - # Execute your test command or script for each test - done - working-directory: ./.github/tests + - name: Run integration tests + run: ./integration_test.sh + shell: bash + working-directory: ./it build: name: build (linux) diff --git a/.gitignore b/.gitignore index 03796f03..8e2305b3 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,4 @@ rpm/*.rpm /.build *.swp *.swo -bootstrap.crt \ No newline at end of file +bootstrap.crt diff --git a/it/docker-compose.yaml b/it/docker-compose.yaml index 13a8d709..7180f521 100644 --- a/it/docker-compose.yaml +++ b/it/docker-compose.yaml @@ -1,14 +1,14 @@ version: '3' services: spire-server: - image: ghcr.io/spiffe/spire-server:1.7.0 + image: ghcr.io/spiffe/spire-server:1.6.3 hostname: spire-server volumes: - ./spire/server:/opt/spire/conf/server command: ["-config", "/opt/spire/conf/server/server.conf"] spire-agent: - image: ghcr.io/spiffe/spire-agent:1.7.0 + image: ghcr.io/spiffe/spire-agent:1.6.3 depends_on: ["spire-server"] hostname: spire-agent volumes: