Skip to content

Commit 74c93c8

Browse files
committed
Rename *use-tls?* to *use-tls-requests?*
Should make its purpose a bit more self-explanatory.
1 parent 4fe4e63 commit 74c93c8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/aleph/http_test.clj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
(def ^:dynamic ^IPool *pool* nil)
6262
(def ^:dynamic *connection-options* nil)
6363
(def ^:dynamic ^String *response* nil)
64-
(def ^:dynamic *use-tls?* false)
64+
(def ^:dynamic *use-tls-requests* false)
6565

6666

6767
(def port 8082)
@@ -73,7 +73,7 @@
7373

7474
(defn- make-url
7575
[path]
76-
(if *use-tls?*
76+
(if *use-tls-requests*
7777
(str "https://localhost:" port path)
7878
(str "http://localhost:" port path)))
7979

@@ -170,7 +170,7 @@
170170
(if (zero? count)
171171
{:status 200 :body "ok"}
172172
{:status 302
173-
:headers {"location" (str (if *use-tls?* "https://" "http://")
173+
:headers {"location" (str (if *use-tls-requests* "https://" "http://")
174174
"localhost:" port
175175
"/redirect?count=" (dec count))}
176176
:body "redirected!"})))
@@ -256,7 +256,7 @@
256256
[handler server-options & body]
257257
;; with-redefs used so clj fns running on netty threads will work
258258
`(testing "- http2"
259-
(with-redefs [*use-tls?* true]
259+
(with-redefs [*use-tls-requests* true]
260260
(with-server (http/start-server ~handler (merge http2-server-options ~server-options))
261261
~@body))))
262262

@@ -271,7 +271,7 @@
271271
(defmacro with-http-ssl-servers
272272
"Run the same body of tests for each HTTP version with SSL enabled"
273273
[handler server-options & body]
274-
`(with-redefs [*use-tls?* true]
274+
`(with-redefs [*use-tls-requests* true]
275275
(let [handler# ~handler
276276
server-options# ~server-options]
277277
(with-http2-server handler# server-options# ~@body)
@@ -457,7 +457,7 @@
457457
(let [ssl-session (atom nil)]
458458
(with-http-ssl-servers (ssl-session-capture-handler ssl-session) {}
459459
(reset! ssl-session nil)
460-
(with-redefs [*use-tls?* false] ; will make http-get use http instead of https
460+
(with-redefs [*use-tls-requests* false] ; will make http-get use http instead of https
461461
(is (some-> (http-get "/")
462462
(d/catch identity)
463463
deref
@@ -642,7 +642,7 @@
642642
(deftest test-explicit-url
643643
(with-handler hello-handler
644644
(is (= "hello" (-> @(http/request {:method :get
645-
:scheme (if *use-tls?* :https :http)
645+
:scheme (if *use-tls-requests* :https :http)
646646
:server-name "localhost"
647647
:server-port port
648648
:request-timeout 1e3

0 commit comments

Comments
 (0)