Skip to content

Commit

Permalink
chore: bump default enterprise gateway image to 3.1.1.3 (#566)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmalek authored Feb 16, 2023
1 parent b1dff95 commit e7e22c3
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 25 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

- Bump Kong Gateway Enterprise default image to 3.1.1.3
[#566](https://github.com/Kong/kubernetes-testing-framework/pull/566)

## v0.29.0

- Fix an endless loop in cleaner's `Cleanup()` when a namespace to be deleted
Expand Down
2 changes: 1 addition & 1 deletion pkg/clusters/addons/kong/addon.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const (
DefaultEnterpriseImageRepo = "kong/kong-gateway"

// DefaultEnterpriseImageTag latest kong enterprise image tag
DefaultEnterpriseImageTag = "2.7.0.0-alpine"
DefaultEnterpriseImageTag = "3.1.1.3-alpine"

// DefaultEnterpriseLicenseSecretName is the name that will be used by default for the
// Kubernetes secret containing the Kong enterprise license that will be
Expand Down
54 changes: 30 additions & 24 deletions test/integration/enterprise_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"testing"
"time"

gokong "github.com/kong/go-kong/kong"
"github.com/sethvargo/go-password/password"
"github.com/stretchr/testify/require"

Expand Down Expand Up @@ -70,30 +71,34 @@ func TestKongEnterprisePostgres(t *testing.T) {
require.NoError(t, err)
req.Header.Set("Kong-Admin-Token", adminPassword)

t.Log("pulling the admin api information")
httpc := http.Client{Timeout: time.Second * 10}
var body []byte
require.Eventually(t, func() bool {
resp, err := httpc.Do(req)
if err != nil {
return false
}
defer resp.Body.Close()
body, err = io.ReadAll(resp.Body)
if err != nil {
return false
}
t.Logf("RESPONSE CODE: %d STATUS: %s", resp.StatusCode, resp.Status)
return resp.StatusCode == http.StatusOK
}, time.Minute, time.Second)

t.Log("verifying the admin api version is enterprise")
adminOutput := struct {
Version string `json:"version"`
}{}
require.NoError(t, json.Unmarshal(body, &adminOutput))
t.Logf("admin output: %+v", &adminOutput)
require.True(t, strings.Contains(adminOutput.Version, "enterprise-edition"))
t.Run("verifying the admin api version is enterprise", func(t *testing.T) {
t.Log("pulling the admin api information")
httpc := http.Client{Timeout: time.Second * 10}
var body []byte
require.Eventually(t, func() bool {
resp, err := httpc.Do(req)
if err != nil {
return false
}
defer resp.Body.Close()
body, err = io.ReadAll(resp.Body)
if err != nil {
return false
}
t.Logf("RESPONSE CODE: %d STATUS: %s", resp.StatusCode, resp.Status)
return resp.StatusCode == http.StatusOK
}, time.Minute, time.Second)

adminOutput := struct {
Version string `json:"version"`
}{}
require.NoError(t, json.Unmarshal(body, &adminOutput))
v, err := gokong.NewVersion(adminOutput.Version)
require.NoError(t, err)

t.Logf("admin api version %s", v)
require.Truef(t, v.IsKongGatewayEnterprise(), "version %s should be an enterprise version but wasn't", v)
})

t.Log("verifying enterprise workspace API functionality")
workspaceEnabledProxyURL := adminURL.String() + "/workspaces"
Expand All @@ -118,6 +123,7 @@ func TestKongEnterprisePostgres(t *testing.T) {
require.NoError(t, <-env.WaitForReady(ctx))

t.Log("accessing httpbin via ingress to validate that the kong proxy is functioning")
httpc := http.Client{Timeout: time.Second * 10}
require.Eventually(t, func() bool {
resp, err := httpc.Get(fmt.Sprintf("%s/%s", proxyURL, httpbinAddon.Path()))
if err != nil {
Expand Down

0 comments on commit e7e22c3

Please sign in to comment.