-
-
Notifications
You must be signed in to change notification settings - Fork 143
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
Make hostname:port configurable for test server. #207
Make hostname:port configurable for test server. #207
Conversation
5a5e6fb
to
362b768
Compare
src/test_runner.cr
Outdated
@@ -110,6 +111,7 @@ module Mint | |||
</body> | |||
</html> | |||
HTML |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HTML | |
HTML |
src/test_runner.cr
Outdated
@@ -8,7 +8,8 @@ module Mint | |||
}) | |||
end | |||
|
|||
PAGE = <<-HTML | |||
def get_page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def get_page | |
def page_source : String |
src/test_runner.cr
Outdated
@@ -282,7 +285,7 @@ module Mint | |||
get "/" do | |||
@failed = [] of Message | |||
@succeeded = 0 | |||
PAGE | |||
get_page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get_page | |
page_source |
b22ef40
to
8823052
Compare
src/test_runner.cr
Outdated
@@ -8,7 +8,8 @@ module Mint | |||
}) | |||
end | |||
|
|||
PAGE = <<-HTML | |||
def page_source : String | |||
<<-HTML |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes sense to memoize it since it's not a constant anymoar.
<<-HTML | |
@page_source ||= <<-HTML |
Please don't merge it until my signal. I want to make it work on Windows first. |
b813ca8
to
6f63a0f
Compare
@Sija @gdotdesign It works, I have also updated the PR description. Please re-review and merge if it's OK. |
6f63a0f
to
e4c7b6f
Compare
e4c7b6f
to
12b71f8
Compare
Thanks 👍 |
Solves #205
What?
There are 4 new options for
mint test
:Running test using Docker:
mint test --manual --host 0.0.0.0
This launches test server on host
0.0.0.0
which is available outside of the Docker container but also sets--browser-host
to127.0.0.1
by default which is a connection address for websocket outside the container. Same withport
/browser_port
pair.Full instruction will be at mint-lang/mint-docker#1