Changeset: 1d7a98754988 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/1d7a98754988
Modified Files:
        clients/mapilib/Tests/systemcertificates.py
Branch: monetdburl
Log Message:

Roll back intentional test failure


diffs (24 lines):

diff --git a/clients/mapilib/Tests/systemcertificates.py 
b/clients/mapilib/Tests/systemcertificates.py
--- a/clients/mapilib/Tests/systemcertificates.py
+++ b/clients/mapilib/Tests/systemcertificates.py
@@ -27,12 +27,15 @@ cmd = ['mclient', '-L-', '-d', f"monetdb
 proc = subprocess.run(cmd, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
 assert proc.returncode == 2, f"mclient is supposed to exit with status 2, not 
{proc.returncode}"
 
-# We expect the server to send something like 'HTTP/1.1 400 Bad Request'
-# libmapi will interpret the first two bytes as a block header.
+# After the TLS handshake succeeds we expect the server to send something like
+# 'HTTP/1.1 400 Bad Request' because we're sending \x00\x00 instead of an HTTP
+# request. libmapi will interpret the first two bytes 'H' and 'T' as an invalid
+# block header.
 #
-# In ASCII, 'H' + 256 * 'T' is 21576.
-ok = b'21576' not in proc.stderr
-if ok or True:
+# In ASCII,  'H' + 256 * 'T'  ==  72 + 256 * 84  ==  21576.
+tls_works_but_mapi_fails = b'21576' in proc.stderr
+
+if not tls_works_but_mapi_fails:
     msg = str(proc.stderr, 'utf-8')
     print(f"Expected mclient to print an error message containing the number 
21576, got:\n--- stderr ---\n{msg}\n---end stderr ---", file=sys.stderr)
     exit(1)
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to