From b8573064e0097b61ca6e780bf9f7918f74db1689 Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Fri, 24 Apr 2020 01:24:30 -0700 Subject: [PATCH] fix nim CI; fix local testament (#14102) (cherry picked from commit d5b7e9902cf9ac2c24be8792555cb017d268ce91) --- testament/important_packages.nim | 2 +- tests/stdlib/thttpclient_ssl.nim | 5 ++++- tests/untestable/thttpclient_ssl.nim | 5 +++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/testament/important_packages.nim b/testament/important_packages.nim index 41dfdbbbde..d2c44e55bd 100644 --- a/testament/important_packages.nim +++ b/testament/important_packages.nim @@ -36,7 +36,7 @@ pkg "glob" pkg "gnuplot" pkg "hts", false, "nim c -o:htss src/hts.nim" pkg "illwill", false, "nimble examples" -pkg "inim", true +# pkg "inim", true # pending https://github.com/inim-repl/INim/issues/74 pkg "itertools", false, "nim doc src/itertools.nim" pkg "iterutils" pkg "jstin" diff --git a/tests/stdlib/thttpclient_ssl.nim b/tests/stdlib/thttpclient_ssl.nim index f247ae4426..b552bc408c 100644 --- a/tests/stdlib/thttpclient_ssl.nim +++ b/tests/stdlib/thttpclient_ssl.nim @@ -123,4 +123,7 @@ when not defined(windows): let msg = getCurrentExceptionMsg() log "client: exception: " & msg # SSL_shutdown:shutdown while in init - check(msg.contains("shutdown while in init") or msg.contains("alert number 48")) + if not (msg.contains("shutdown while in init") or msg.contains("alert number 48") or + msg.contains("routines:CONNECT_CR_CERT:certificate verify failed")): + echo "CVerifyPeer exception: " & msg + check(false) diff --git a/tests/untestable/thttpclient_ssl.nim b/tests/untestable/thttpclient_ssl.nim index 3744df92da..3535670859 100644 --- a/tests/untestable/thttpclient_ssl.nim +++ b/tests/untestable/thttpclient_ssl.nim @@ -101,11 +101,12 @@ template evaluate(exception_msg: string, category: Category, desc: string) = if category in {good_broken, dubious_broken, bad_broken}: skip() if raised: - check exception_msg == "No SSL certificate found." or + # check exception_msg == "No SSL certificate found." or + doAssert exception_msg == "No SSL certificate found." or exception_msg == "SSL Certificate check failed." or exception_msg.contains("certificate verify failed") or exception_msg.contains("key too small") or - exception_msg.contains "shutdown while in init" + exception_msg.contains "shutdown while in init", exception_msg else: # this is unexpected