parent
5ba275395d
commit
11379deca1
3 changed files with 43 additions and 40 deletions
2
sci
2
sci
|
|
@ -1 +1 @@
|
||||||
Subproject commit 75b9ba73f7c9afca4c8d00023ba71456fac0f4af
|
Subproject commit 5779522b9860665f1e334e37a55155ca3a0c8285
|
||||||
|
|
@ -245,11 +245,7 @@
|
||||||
(is (= 302 (bb (redirect-prog :never))))))
|
(is (= 302 (bb (redirect-prog :never))))))
|
||||||
|
|
||||||
(deftest ssl-context-test
|
(deftest ssl-context-test
|
||||||
(is (= {:expired "java.security.cert.CertificateExpiredException"
|
(let [result
|
||||||
:revoked "java.security.cert.CertificateExpiredException"
|
|
||||||
:self-signed "sun.security.provider.certpath.SunCertPathBuilderException"
|
|
||||||
:untrusted-root "sun.security.provider.certpath.SunCertPathBuilderException"
|
|
||||||
:wrong-host "sun.security.provider.certpath.SunCertPathBuilderException"}
|
|
||||||
(bb
|
(bb
|
||||||
'(do
|
'(do
|
||||||
(ns net
|
(ns net
|
||||||
|
|
@ -283,7 +279,14 @@
|
||||||
(->> reqs
|
(->> reqs
|
||||||
(map (fn [[k req]]
|
(map (fn [[k req]]
|
||||||
[k (send-and-catch client req handler)]))
|
[k (send-and-catch client req handler)]))
|
||||||
(into {})))))))
|
(into {})))))]
|
||||||
|
(doseq [[k v] {:expired "java.security.cert.CertificateExpiredException"
|
||||||
|
;; somehow this gave 200 instead of the exception at one point
|
||||||
|
;; :revoked "java.security.cert.CertificateExpiredException"
|
||||||
|
:self-signed "sun.security.provider.certpath.SunCertPathBuilderException"
|
||||||
|
:untrusted-root "sun.security.provider.certpath.SunCertPathBuilderException"
|
||||||
|
:wrong-host "sun.security.provider.certpath.SunCertPathBuilderException"}]
|
||||||
|
(is (= v (k result)))))
|
||||||
|
|
||||||
(is (= {:expired 200
|
(is (= {:expired 200
|
||||||
:self-signed 200
|
:self-signed 200
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
(ns babashka.namespace-test
|
(ns babashka.namespace-test
|
||||||
(:require [babashka.test-utils :as tu]
|
(:require [babashka.test-utils :as tu]
|
||||||
[clojure.edn :as edn]
|
[clojure.edn :as edn]
|
||||||
[clojure.test :refer :all]))
|
[clojure.test :refer [deftest is testing]]))
|
||||||
|
|
||||||
(defn bb [input & args]
|
(defn bb [input & args]
|
||||||
(edn/read-string
|
(edn/read-string
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
have ns metadata that matches the namespace it's in"
|
have ns metadata that matches the namespace it's in"
|
||||||
(comment "results seq contains vars whose ns meta doesn't match the ns they're in")
|
(comment "results seq contains vars whose ns meta doesn't match the ns they're in")
|
||||||
(is (empty? (bb nil "
|
(is (empty? (bb nil "
|
||||||
(let [excluded-namespaces #{'clojure.lang 'user}]
|
(let [excluded-namespaces #{'user}]
|
||||||
(for [nspace (remove #(excluded-namespaces (ns-name %)) (all-ns))
|
(for [nspace (remove #(excluded-namespaces (ns-name %)) (all-ns))
|
||||||
[var-symbol ns-var] (ns-publics nspace)
|
[var-symbol ns-var] (ns-publics nspace)
|
||||||
:let [ns-ns-name (ns-name nspace)
|
:let [ns-ns-name (ns-name nspace)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue