mirror of
https://github.com/enso-org/enso.git
synced 2024-12-23 16:32:18 +03:00
Allow trailing space in ENSO_HTTP_TEST_HTTPBIN_URL
URL. (#3500)
This commit is contained in:
parent
33a06c9ddf
commit
9842b0e5f0
@ -3,4 +3,4 @@ This is a set of tests for the `Base` library for Enso.
|
||||
The run test suite for the HTTP component requires an active `httbin` server on
|
||||
the localhost. If it is present, the port it listens to should be provided by
|
||||
setting the `ENSO_HTTP_TEST_HTTPBIN_URL` environment variable to a value like
|
||||
`http://localhost:8080`. The URL should not contain a trailing slash.
|
||||
`http://localhost:8080`. The URL may contain a trailing slash.
|
||||
|
@ -23,8 +23,12 @@ spec =
|
||||
The HTTP tests only run when the `ENSO_HTTP_TEST_HTTPBIN_URL` environment variable is set to URL of the httpbin server
|
||||
|
||||
Test.group "Http" pending=pending <|
|
||||
url_get = base_url + "/get"
|
||||
url_post = base_url + "/post"
|
||||
# httpbin is picky about slashes in URL path. We need exactly one at the
|
||||
# beginning of path. Otherwise, POST request with double slash would
|
||||
# fail with error 405.
|
||||
base_url_with_slash = if base_url.ends_with "/" then base_url else base_url + "/"
|
||||
url_get = base_url_with_slash + "get"
|
||||
url_post = base_url_with_slash + "post"
|
||||
Test.specify "should create HTTP client with timeout setting" <|
|
||||
http = Http.new (timeout = 30.seconds)
|
||||
http.timeout.should_equal 30.seconds
|
||||
|
Loading…
Reference in New Issue
Block a user