Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix tls-passthrough-custom-port test cleanup #4717

Merged
merged 2 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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