From 66a5d6d863a4501f898fbee93884c5b595fea79c Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Fri, 5 Apr 2024 11:36:33 +0200 Subject: [PATCH 1/4] Integration tests: use more descriptive matrix variable names --- .github/workflows/integration-tests.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index b0dbf1251..ba6467644 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -15,12 +15,12 @@ jobs: fail-fast: false matrix: database: - - name: mysql - pretty_name: MySQL - - name: pgsql - pretty_name: PostgreSQL + - name: MySQL + type: mysql + - name: PostgreSQL + type: pgsql - name: ${{ matrix.database.pretty_name }} + name: ${{ matrix.database.name }} runs-on: ubuntu-latest steps: @@ -40,7 +40,7 @@ jobs: - name: Run Integration Tests run: ./icingadb-test -icingatesting.debuglog debug.log -test.v env: - ICINGADB_TESTS_DATABASE_TYPE: ${{ matrix.database.name }} + ICINGADB_TESTS_DATABASE_TYPE: ${{ matrix.database.type }} ICINGA_TESTING_ICINGADB_BINARY: ${{ github.workspace }}/icingadb ICINGA_TESTING_ICINGADB_SCHEMA_MYSQL: ${{ github.workspace }}/schema/mysql/schema.sql ICINGA_TESTING_ICINGADB_SCHEMA_PGSQL: ${{ github.workspace }}/schema/pgsql/schema.sql @@ -51,6 +51,6 @@ jobs: if: ${{ always() }} uses: actions/upload-artifact@v4 with: - name: ${{ matrix.database.name }}-debug.log.xz + name: ${{ matrix.database.type }}-debug.log.xz path: debug.log.xz retention-days: 1 From 32dc47b0b43d1bb73b212cab55fa718a0e1f7d74 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Fri, 5 Apr 2024 12:36:02 +0200 Subject: [PATCH 2/4] Integration tests: include MariaDB as well just to be sure we're compatible with this RDBMS and not only MySQL. --- .github/workflows/integration-tests.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index ba6467644..cbb7b1453 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -16,9 +16,14 @@ jobs: matrix: database: - name: MySQL - type: mysql + type: MYSQL + image: mysql:latest + - name: MariaDB + type: MYSQL + image: mariadb:latest - name: PostgreSQL - type: pgsql + type: PGSQL + image: postgres:latest name: ${{ matrix.database.name }} runs-on: ubuntu-latest @@ -41,6 +46,7 @@ jobs: run: ./icingadb-test -icingatesting.debuglog debug.log -test.v env: ICINGADB_TESTS_DATABASE_TYPE: ${{ matrix.database.type }} + ICINGA_TESTING_${{ matrix.database.type }}_IMAGE: ${{ matrix.database.image }} ICINGA_TESTING_ICINGADB_BINARY: ${{ github.workspace }}/icingadb ICINGA_TESTING_ICINGADB_SCHEMA_MYSQL: ${{ github.workspace }}/schema/mysql/schema.sql ICINGA_TESTING_ICINGADB_SCHEMA_PGSQL: ${{ github.workspace }}/schema/pgsql/schema.sql @@ -51,6 +57,6 @@ jobs: if: ${{ always() }} uses: actions/upload-artifact@v4 with: - name: ${{ matrix.database.type }}-debug.log.xz + name: ${{ matrix.database.name }}-debug.log.xz path: debug.log.xz retention-days: 1 From 7b802291695092cf6475aa998ca4f6bf01d814b0 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Mon, 15 Sep 2025 13:29:34 +0200 Subject: [PATCH 3/4] tests/: bump github.com/icinga/icinga-testing --- tests/go.mod | 2 +- tests/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/go.mod b/tests/go.mod index 222329557..c12ffe4f2 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -7,7 +7,7 @@ require ( github.com/goccy/go-yaml v1.13.0 github.com/google/uuid v1.6.0 github.com/icinga/icinga-go-library v0.7.2 - github.com/icinga/icinga-testing v0.0.0-20240322142451-494ccd6d03e8 + github.com/icinga/icinga-testing v0.0.0-20250901101810-43491aa4f931 github.com/jmoiron/sqlx v1.4.0 github.com/lib/pq v1.10.9 github.com/redis/go-redis/v9 v9.14.0 diff --git a/tests/go.sum b/tests/go.sum index 1327645ad..522251874 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -72,8 +72,8 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1 github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/icinga/icinga-go-library v0.7.2 h1:6ilUeE9F9OqxxJXNR9URWDf6zOqsdhjjR9w1MUXY9Kg= github.com/icinga/icinga-go-library v0.7.2/go.mod h1:HZTiYD+N+9FZIVpPdUEJWJnc6sLvrIRO03jvkdkmUEU= -github.com/icinga/icinga-testing v0.0.0-20240322142451-494ccd6d03e8 h1:PI+39IY1BjN24JC3B6Jy0rhwm3hqC4SnQFxbZjXOaHk= -github.com/icinga/icinga-testing v0.0.0-20240322142451-494ccd6d03e8/go.mod h1:xjNiwePgnSVKJWPG/iFG7pNOibU/OWp01Zdl08o+EeI= +github.com/icinga/icinga-testing v0.0.0-20250901101810-43491aa4f931 h1:YdZ7XuBVbGimF1zrZq/y7y7faLb2CzbccVzHzHdRODY= +github.com/icinga/icinga-testing v0.0.0-20250901101810-43491aa4f931/go.mod h1:xjNiwePgnSVKJWPG/iFG7pNOibU/OWp01Zdl08o+EeI= github.com/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o= github.com/jmoiron/sqlx v1.4.0/go.mod h1:ZrZ7UsYB/weZdl2Bxg6jCRO9c3YHl8r3ahlKmRT4JLY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= From 36f906815eb0f092eff70bd1f04c53faf98cfec3 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Mon, 15 Sep 2025 14:34:14 +0200 Subject: [PATCH 4/4] Integration tests: include minimum required RDBMS versions --- .github/workflows/integration-tests.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index cbb7b1453..bf64775d4 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -18,12 +18,22 @@ jobs: - name: MySQL type: MYSQL image: mysql:latest + - name: MySQL (minimum required version) + type: MYSQL + image: mysql:8.0.0 - name: MariaDB type: MYSQL image: mariadb:latest + - name: MariaDB (minimum required version) + type: MYSQL + # Actually we support v10.2.2+, but Docker Hub doesn't. + image: mariadb:10.2.5 - name: PostgreSQL type: PGSQL image: postgres:latest + - name: PostgreSQL (minimum required version) + type: PGSQL + image: postgres:9.6.0 name: ${{ matrix.database.name }} runs-on: ubuntu-latest