diff --git a/.github/workflows/integration-test-enterprise.yaml b/.github/workflows/integration-test-enterprise.yaml index 403703e88..7a1594beb 100644 --- a/.github/workflows/integration-test-enterprise.yaml +++ b/.github/workflows/integration-test-enterprise.yaml @@ -37,6 +37,24 @@ jobs: if: needs.secret-available.outputs.ok strategy: matrix: + # Skip explicitly to avoid spawning many unecessary jobs, + # since expressions router is supported for Kong >= 3.0. + # Option router_flavor is ignored for Kong < 3.0. + exclude: + - kong_version: '2.2' + router_flavor: 'expressions' + - kong_version: '2.3' + router_flavor: 'expressions' + - kong_version: '2.4' + router_flavor: 'expressions' + - kong_version: '2.5' + router_flavor: 'expressions' + - kong_version: '2.6' + router_flavor: 'expressions' + - kong_version: '2.7' + router_flavor: 'expressions' + - kong_version: '2.8' + router_flavor: 'expressions' router_flavor: - 'traditional_compatible' - 'expressions' @@ -52,6 +70,7 @@ jobs: - '3.1' - '3.2' - '3.3' + - '3.4' env: KONG_ROUTER_FLAVOR: ${{ matrix.router_flavor }} KONG_IMAGE_TAG: ${{ matrix.kong_version }} diff --git a/.github/workflows/integration-test.yaml b/.github/workflows/integration-test.yaml index adba72bb5..cdddb4bd5 100644 --- a/.github/workflows/integration-test.yaml +++ b/.github/workflows/integration-test.yaml @@ -19,25 +19,48 @@ jobs: test: strategy: matrix: - kong_version: - - '2.1' - - '2.2' - - '2.3' - - '2.4' - - '2.5' - - '2.6' - - '2.7' - - '2.8' - - '3.0' - - '3.1' - - '3.2' - - '3.3' + # Skip explicitly to avoid spawning many unecessary jobs, + # since expressions router is supported for Kong >= 3.0. + # Option router_flavor is ignored for Kong < 3.0. + exclude: + - kong_version: '2.1' + router_flavor: 'expressions' + - kong_version: '2.2' + router_flavor: 'expressions' + - kong_version: '2.2' + router_flavor: 'expressions' + - kong_version: '2.3' + router_flavor: 'expressions' + - kong_version: '2.4' + router_flavor: 'expressions' + - kong_version: '2.5' + router_flavor: 'expressions' + - kong_version: '2.6' + router_flavor: 'expressions' + - kong_version: '2.7' + router_flavor: 'expressions' + - kong_version: '2.8' + router_flavor: 'expressions' dbmode: - 'dbless' - 'postgres' router_flavor: - 'traditional_compatible' - 'expressions' + kong_version: + - '2.1' + - '2.2' + - '2.3' + - '2.4' + - '2.5' + - '2.6' + - '2.7' + - '2.8' + - '3.0' + - '3.1' + - '3.2' + - '3.3' + - '3.4' env: KONG_ROUTER_FLAVOR: ${{ matrix.router_flavor }} KONG_IMAGE_TAG: ${{ matrix.kong_version }} diff --git a/kong/plugin_service_test.go b/kong/plugin_service_test.go index 7b1e3643f..e4bbd2e4a 100644 --- a/kong/plugin_service_test.go +++ b/kong/plugin_service_test.go @@ -42,6 +42,7 @@ func TestPluginsServiceValidation(T *testing.T) { func TestPluginsService(T *testing.T) { RunWhenDBMode(T, "postgres") + SkipWhenKongRouterFlavor(T, Expressions) assert := assert.New(T) require := require.New(T) @@ -403,6 +404,7 @@ func TestPluginListEndpoint(T *testing.T) { func TestPluginListAllForEntityEndpoint(T *testing.T) { RunWhenDBMode(T, "postgres") + SkipWhenKongRouterFlavor(T, Expressions) assert := assert.New(T) require := require.New(T) diff --git a/kong/route_service_test.go b/kong/route_service_test.go index e76e29a60..4afc8853c 100644 --- a/kong/route_service_test.go +++ b/kong/route_service_test.go @@ -11,6 +11,7 @@ import ( func TestRoutesRoute(T *testing.T) { RunWhenDBMode(T, "postgres") + SkipWhenEnterprise() assert := assert.New(T) require := require.New(T) @@ -104,6 +105,8 @@ func TestRoutesRoute(T *testing.T) { func TestRouteWithTags(T *testing.T) { RunWhenDBMode(T, "postgres") RunWhenKong(T, ">=1.1.0") + SkipWhenKongRouterFlavor(T, Traditional, TraditionalCompatible) + require := require.New(T) client, err := NewTestClient(nil, nil) diff --git a/kong/test_utils.go b/kong/test_utils.go index 7259a6a3e..091bb5c5b 100644 --- a/kong/test_utils.go +++ b/kong/test_utils.go @@ -154,7 +154,7 @@ func SkipWhenKongRouterFlavor(t *testing.T, flavor ...RouterFlavor) { } for _, f := range flavor { if RouterFlavor(routerFlavor) == f { - t.Skipf("detected Kong running with router flavor:%q but requested router flavor:%q", routerFlavor, f) + t.Skipf("router flavor:%q skipping", f) } } } diff --git a/kong/vault_service_test.go b/kong/vault_service_test.go index a7c5712b8..7d3a32a52 100644 --- a/kong/vault_service_test.go +++ b/kong/vault_service_test.go @@ -75,7 +75,9 @@ func TestVaultsService(t *testing.T) { require.Equal(id, *createdVault.ID) require.Equal("aws", *createdVault.Name) require.Equal("aws vault for secrets", *createdVault.Description) - require.Equal(Configuration{"region": "us-east-2"}, createdVault.Config) + region, ok := createdVault.Config["region"] + require.Equal(true, ok) + require.Equal("us-east-2", region) err = client.Vaults.Delete(defaultCtx, createdVault.ID) require.NoError(err)