Skip to content

Commit

Permalink
fix(tests): fix TestKongAddonWithCustomImage which was waiting for Lo…
Browse files Browse the repository at this point in the history
…adBalancer IP without metallb installed (#541)

* fix(tests) fix TestKongAddonWithCustomImage which was waiting for LoadBalancer IP without metallb installed

* tests: remove broken testcase
  • Loading branch information
pmalek authored Feb 3, 2023
1 parent f9eadcf commit 6cfb2cb
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions test/integration/kongaddon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ func (tc customImageTest) name() string {

func TestKongAddonWithCustomImage(t *testing.T) {
tests := []customImageTest{
{
controllerImageRepo: "kong/kubernetes-ingress-controller",
controllerImageTag: "2.3.0",
proxyImageRepo: "kong",
proxyImageTag: "2.7",
},
{
controllerImageRepo: "kong/kubernetes-ingress-controller",
controllerImageTag: "2.3.1",
Expand All @@ -77,7 +71,11 @@ func testKongAddonWithCustomImage(t *testing.T, tc customImageTest) {
Build()

t.Log("configuring the testing environment")
builder := environment.NewBuilder().WithAddons(kong)
// Add metallb to get an IP address for Kong's LoadBalancerservices
// TODO: when https://github.com/Kong/kubernetes-testing-framework/issues/540
// gets resolved then we can configure service types to be of ClusterIP and
// do away with metallb deployment here.
builder := environment.NewBuilder().WithAddons(kong, metallbaddon.New())

t.Log("building the testing environment and Kubernetes cluster")
env, err := builder.Build(ctx)
Expand All @@ -92,8 +90,8 @@ func testKongAddonWithCustomImage(t *testing.T, tc customImageTest) {
require.NoError(t, env.Cleanup(ctx))
}()

t.Log("verifying that addons have been loaded into the environment")
require.Len(t, env.Cluster().ListAddons(), 1)
t.Log("verifying that addons (kong and metallb) have been loaded into the environment")
require.Len(t, env.Cluster().ListAddons(), 2)

t.Log("verifying that the kong deployment is using custom images")
deployments := env.Cluster().Client().AppsV1().Deployments(kong.Namespace())
Expand Down

0 comments on commit 6cfb2cb

Please sign in to comment.