This is an automated email from the ASF dual-hosted git repository.
kichan pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/trafficserver-ingress-controller.git
The following commit(s) were added to refs/heads/master by this push:
new c54d7f3 Enhance TLS error handling in test_ingress.py (#328)
c54d7f3 is described below
commit c54d7f3cf6e8780b4d6434d5c2524d1d20ede3aa
Author: Kit Chan <[email protected]>
AuthorDate: Wed Jan 7 11:44:35 2026 -0800
Enhance TLS error handling in test_ingress.py (#328)
Update test to accept multiple TLS error messages for missing client
certificate.
---
tests/suite/test_ingress.py | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/tests/suite/test_ingress.py b/tests/suite/test_ingress.py
index 0cfcbd8..13a5993 100644
--- a/tests/suite/test_ingress.py
+++ b/tests/suite/test_ingress.py
@@ -541,9 +541,20 @@ class TestIngress:
cmd = f'curl --cacert certs/rootCA.crt -v --resolve
test.edge.com:30443:{minikubeip} https://test.edge.com:30443/app2'
result = subprocess.run(cmd, shell=True, capture_output=True,
text=True)
assert result.returncode != 0, "Curl unexpectedly succeeded without
client certificate"
- expected_error = "tlsv13 alert certificate required"
- assert expected_error in result.stderr, (
- f"Expected TLS failure not found. stderr:\n{result.stderr}"
+
+ # Accept multiple possible error messages indicating client cert is
required
+ expected_errors = [
+ "tlsv13 alert certificate required",
+ "tlsv1 alert certificate required",
+ "alert certificate required",
+ "Connection reset by peer",
+ "SSL peer certificate or SSH remote key was not OK",
+ "SSL certificate problem"
+ ]
+
+ error_found = any(error in result.stderr. lower() for error in
[e.lower() for e in expected_errors])
+ assert error_found, (
+ f"Expected TLS/SSL failure indicating missing client certificate.
stderr:\n{result.stderr}"
)
def test_host_sni_none(self, minikubeip):