Skip to content
This repository has been archived by the owner on Jul 24, 2018. It is now read-only.

Commit

Permalink
Set separate :ssl-port in self-signed SSL tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
technomancy committed Oct 28, 2011
1 parent d0459bf commit 82a1a8b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Binary file added test-resources/keystore
Binary file not shown.
9 changes: 7 additions & 2 deletions test/clj_http/core_test.clj
Expand Up @@ -107,9 +107,14 @@

(deftest ^{:integration true} self-signed-ssl-get
(let [t (doto (Thread. #(ring/run-jetty handler
{:port 18081 :ssl? true})) .start)]
{:port 8081 :ssl-port 18082 :ssl? true
:keystore "test-resources/keystore"
:key-password "keykey"})) .start)]
(try
(let [resp (request {:request-method :get :uri "/get"
(is (thrown? javax.net.ssl.SSLPeerUnverifiedException
(request {:request-method :get :uri "/get"
:server-port 18082 :scheme "https"})))
(let [resp (request {:request-method :get :uri "/get" :server-port 18082
:scheme "https" :insecure? true})]
(is (= 200 (:status resp)))
(is (= "get" (slurp-body resp))))
Expand Down

0 comments on commit 82a1a8b

Please sign in to comment.