diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 324382e..78f74b3 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -14,6 +14,11 @@ concurrency: jobs: test: + strategy: + matrix: + kind_image: + - "kindest/node:v1.29.8@sha256:d46b7aa29567e93b27f7531d258c372e829d7224b25e3fc6ffdefed12476d3aa" + - "kindest/node:v1.30.4@sha256:976ea815844d5fa93be213437e3ff5754cd599b040946b5cca43ca45c2047114" runs-on: ubuntu-latest # Have enough timeout for `make e2e` # which requires up to 45 minutes to run. @@ -36,6 +41,8 @@ jobs: # only when triggered manually or on a schedule. - name: Run E2E tests run: make e2e + env: + KIND_IMAGE: ${{ matrix.kind_image }} golangci: name: lint runs-on: ubuntu-latest diff --git a/cmd/cert-manager/cert-manager_test.go b/cmd/cert-manager/cert-manager_test.go index 7d49a98..3828baa 100644 --- a/cmd/cert-manager/cert-manager_test.go +++ b/cmd/cert-manager/cert-manager_test.go @@ -23,7 +23,9 @@ import ( func TestMain(m *testing.M) { h, err := testkit.Build( testkit.Providers( - &testkit.KindProvider{}, + &testkit.KindProvider{ + Image: os.Getenv("KIND_IMAGE"), + }, &testkit.KubectlProvider{}, ), testkit.RetainResourcesOnFailure(), diff --git a/cmd/datadog-agent/datadog-agent_test.go b/cmd/datadog-agent/datadog-agent_test.go index 3d280ea..d694568 100644 --- a/cmd/datadog-agent/datadog-agent_test.go +++ b/cmd/datadog-agent/datadog-agent_test.go @@ -91,7 +91,9 @@ func TestDatadogAgentCheckE2E(t *testing.T) { h := testkit.New(t, testkit.Providers( - &testkit.KindProvider{}, + &testkit.KindProvider{ + Image: os.Getenv("KIND_IMAGE"), + }, &testkit.KubectlProvider{}, ), testkit.RetainResourcesOnFailure(), diff --git a/cmd/ingress/ingress_test.go b/cmd/ingress/ingress_test.go index cea2deb..965dd30 100644 --- a/cmd/ingress/ingress_test.go +++ b/cmd/ingress/ingress_test.go @@ -33,7 +33,9 @@ func TestIngressCheckE2E(t *testing.T) { h := testkit.New(t, testkit.Providers( - &testkit.KindProvider{}, + &testkit.KindProvider{ + Image: os.Getenv("KIND_IMAGE"), + }, &testkit.KubectlProvider{}, ), testkit.RetainResourcesOnFailure(), diff --git a/go.mod b/go.mod index 7f28fe2..b3e68ff 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/cert-manager/cert-manager v1.15.3 github.com/hashicorp/go-multierror v1.1.1 github.com/miekg/dns v1.1.59 - github.com/mumoshu/testkit v0.9.0 + github.com/mumoshu/testkit v0.10.0 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.8.1 github.com/stretchr/testify v1.9.0 diff --git a/go.sum b/go.sum index dfce7b8..e6d265d 100644 --- a/go.sum +++ b/go.sum @@ -147,8 +147,8 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mumoshu/testkit v0.9.0 h1:JTFFBvTIzI75HgBFhPttYxiEYfD2FRtJ2I7lsQIPa50= -github.com/mumoshu/testkit v0.9.0/go.mod h1:Crie3WCQJHbW8W8Aj1jjyZF0QY07yB68JOAZZJNeuaw= +github.com/mumoshu/testkit v0.10.0 h1:F/m0/fUzgzf9dgdA4vqj0Bjcw98b4U1iSfaybYWWrVU= +github.com/mumoshu/testkit v0.10.0/go.mod h1:UIqn/rsr4ziNdnV7rY/idcYrcpE9n19H10Xhwt8vLqk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA=