Skip to content

Commit

Permalink
chore: specify GKE release channel for E2E tests (#5371)
Browse files Browse the repository at this point in the history
  • Loading branch information
czeslavo authored Dec 20, 2023
1 parent 49314d1 commit 75e69ff
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/_e2e_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ jobs:
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }}
GOOGLE_LOCATION: ${{ secrets.GOOGLE_LOCATION }}
TEST_GKE_CLUSTER_RELEASE_CHANNEL: "rapid"

- name: upload diagnostics
if: ${{ always() }}
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ require (
github.com/kong/go-database-reconciler v1.1.0
github.com/kong/go-kong v0.48.0
github.com/kong/kubernetes-telemetry v0.1.3
github.com/kong/kubernetes-testing-framework v0.42.0
github.com/kong/kubernetes-testing-framework v0.43.0
github.com/lithammer/dedent v1.1.0
github.com/miekg/dns v1.1.57
github.com/mitchellh/mapstructure v1.5.0
Expand Down Expand Up @@ -185,7 +185,7 @@ require (
github.com/shirou/gopsutil/v3 v3.23.10 // indirect
github.com/shopspring/decimal v1.2.0 // indirect
github.com/sourcegraph/conc v0.3.0
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/ssgelm/cookiejarparser v1.0.1 // indirect
github.com/tidwall/gjson v1.17.0
github.com/tidwall/match v1.1.1 // indirect
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY=
github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
Expand Down Expand Up @@ -258,8 +258,8 @@ github.com/kong/go-kong v0.48.0 h1:vK1OpoxO50qlKdwPfmx9ChvkTKRsoCCB3b3iHo1umLc=
github.com/kong/go-kong v0.48.0/go.mod h1:qH4CEFqT83ywmu1TlMZX09clQH4B8/dX88CtT/jdv/E=
github.com/kong/kubernetes-telemetry v0.1.3 h1:Hz2tkHGIIUqbn1x46QRDmmNjbEtJyxyOvHSPne3uPto=
github.com/kong/kubernetes-telemetry v0.1.3/go.mod h1:wB7o8dOKa5R396CyiU0sPa8am/g3c5DKd/qrn/Vmb+k=
github.com/kong/kubernetes-testing-framework v0.42.0 h1:ykkgJujEw/O8PqsfEJVCrytWaWDCsVeXGPItSO4pNT0=
github.com/kong/kubernetes-testing-framework v0.42.0/go.mod h1:FWSlK73D1cfNLVy44ug66GPfI2ibc4NrRd8xrsZxUTY=
github.com/kong/kubernetes-testing-framework v0.43.0 h1:Pjh4NMlwApFqi9RPW5NPHD3mOCA62pHKLLX4pWnHGXw=
github.com/kong/kubernetes-testing-framework v0.43.0/go.mod h1:O8Zw6cvWKOS5oVUqh8SEFCX83VywKPx35kleUbeCAwc=
github.com/kong/semver/v4 v4.0.1 h1:DIcNR8W3gfx0KabFBADPalxxsp+q/5COwIFkkhrFQ2Y=
github.com/kong/semver/v4 v4.0.1/go.mod h1:LImQ0oT15pJvSns/hs2laLca2zcYoHu5EsSNY0J6/QA=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
Expand Down Expand Up @@ -399,8 +399,8 @@ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVs
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA=
github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48=
github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0=
github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g=
github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
Expand Down
3 changes: 3 additions & 0 deletions test/e2e/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ func createGKEBuilder(t *testing.T) (*environments.Builder, error) {
t.Logf("creating GKE cluster, with requested version: %s", k8sVersion)
clusterBuilder.WithClusterVersion(k8sVersion)
}
if ch := testenv.GKEClusterReleaseChannel(); ch != "" {
clusterBuilder.WithReleaseChannel(gke.ReleaseChannel(ch))
}

return environments.NewBuilder().WithClusterBuilder(clusterBuilder), nil
}
Expand Down
6 changes: 6 additions & 0 deletions test/internal/testenv/testenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@ func ClusterVersion() string {
return os.Getenv("KONG_CLUSTER_VERSION")
}

// GKEClusterReleaseChannel indicates the GKE cluster release channel to use when
// creating a GKE cluster in tests.
func GKEClusterReleaseChannel() string {
return os.Getenv("TEST_GKE_CLUSTER_RELEASE_CHANNEL")
}

// ClusterProvider indicates the Kubernetes cluster provider.
func ClusterProvider() string {
return os.Getenv("KONG_CLUSTER_PROVIDER")
Expand Down

0 comments on commit 75e69ff

Please sign in to comment.