clj-commons/clj-http-lite

tests: server-name should not include port

lread opened this issue · 0 comments

lread commented

I happened to notice...

That our current integration tests include the port in the :server-name:

{:scheme :http
:server-name (str "localhost:" (current-port))
:port (current-port)})

But this is because...

The we expect :server-port, and not as we see above :port.

(defn request
"Executes the HTTP request corresponding to the given Ring `req` map and
returns the Ring response map corresponding to the resulting HTTP response."
[{:keys [request-method scheme server-name server-port uri query-string
headers content-type character-encoding body socket-timeout
conn-timeout insecure? save-request? follow-redirects
chunk-size] :as req}]

Soo...

I'll fix that up. It happens to work, but it is not proper usage and misleading to anyone reading our tests.