Skip to content

Commit 58a8b3f

Browse files
authored
tests: server-name no longer includes port (#53)
Closes #52
1 parent 0219dc9 commit 58a8b3f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/clj_http/test/core_test.clj

+6-6
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@
8282

8383
(defn base-req []
8484
{:scheme :http
85-
:server-name (str "localhost:" (current-port))
86-
:port (current-port)})
85+
:server-name "localhost"
86+
:server-port (current-port)})
8787

8888
(defn request [req]
8989
(core/request (merge (base-req) req)))
@@ -166,8 +166,8 @@
166166
(let [client-opts {:request-method :get
167167
:uri "/get"
168168
:scheme :https
169-
:server-name (str "localhost:" (current-https-port))
170-
:port (current-https-port)}]
169+
:server-name "localhost"
170+
:server-port (current-https-port)}]
171171
(is (thrown? javax.net.ssl.SSLException
172172
(request client-opts)))
173173
(let [resp (request (assoc client-opts :insecure? true))]
@@ -186,8 +186,8 @@
186186
:http-url (str "http://localhost:" (current-port) "/post")
187187
:request-method :post
188188
:uri "/post"
189-
:server-name (str "localhost:" (current-port))
190-
:port (current-port)}
189+
:server-name "localhost"
190+
:server-port (current-port)}
191191
(-> resp
192192
:request
193193
(dissoc :body))))))

0 commit comments

Comments
 (0)