Skip to content

Commit

Permalink
fix cleanup of tls-passthrough-custom-port test
Browse files Browse the repository at this point in the history
  • Loading branch information
pdabelf5 committed Nov 29, 2023
1 parent ad52e78 commit 0a963b6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,4 @@ package.json

# kind kube-config
kube-local
venv/
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,8 @@ deps: ## Add missing and remove unused modules, verify deps and download them to
.PHONY: clean-cache
clean-cache: ## Clean go cache
@go clean -modcache

.PHONY: rebuild-test-img ## Rebuild the python e2e test image
rebuild-test-img:
cd tests && \
make build
1 change: 0 additions & 1 deletion tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ TEST_PREFIX = test-runner
KUBE_CONFIG_FOLDER = ${HOME}/.kube
KIND_KUBE_CONFIG_FOLDER = $(KUBE_CONFIG_FOLDER)/kind
SHOW_IC_LOGS = no
PYTEST_ARGS =
DOCKERFILEPATH := ${ROOT_DIR}/tests/Dockerfile
IP_FAMILY = dual
TEST_TAG ?= latest ## The Tag to use for the test image. e.g. commitsha
Expand Down
4 changes: 4 additions & 0 deletions tests/suite/fixtures/ic_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def crd_ingress_controller(
"""
namespace = ingress_controller_prerequisites.namespace
name = "nginx-ingress"
orig_port = 0

try:
print("------------------------- Update ClusterRole -----------------------------------")
Expand All @@ -94,6 +95,7 @@ def crd_ingress_controller(
request.param.get("extra_args", None),
)
if request.param["type"] == "tls-passthrough-custom-port":
orig_port = ingress_controller_endpoint.port_ssl
ingress_controller_endpoint.port_ssl = ingress_controller_endpoint.custom_ssl_port
ensure_connection_to_public_endpoint(
ingress_controller_endpoint.public_ip,
Expand All @@ -114,6 +116,8 @@ def fin():
patch_rbac(kube_apis.rbac_v1, f"{DEPLOYMENTS}/rbac/rbac.yaml")
print("Remove the IC:")
delete_ingress_controller(kube_apis.apps_v1_api, name, cli_arguments["deployment-type"], namespace)
if request.param["type"] == "tls-passthrough-custom-port":
ingress_controller_endpoint.port_ssl = orig_port

request.addfinalizer(fin)

Expand Down

0 comments on commit 0a963b6

Please sign in to comment.