Skip to content

tests: server-name should not include port #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lread opened this issue Aug 22, 2022 · 0 comments · Fixed by #53
Closed

tests: server-name should not include port #52

lread opened this issue Aug 22, 2022 · 0 comments · Fixed by #53

Comments

@lread
Copy link
Collaborator

lread commented Aug 22, 2022

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.

lread added a commit to lread/clj-http-lite that referenced this issue Aug 22, 2022
@lread lread closed this as completed in #53 Aug 22, 2022
lread added a commit that referenced this issue Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant