tests: Use zulipdev.com for server_is_up() check.

Folks can have issues connecting to Casper
as zulipdev.com when they are not connected to
the internet or just have a bad connection, since
the DNS record is on the internet.  Folks can
work around this by just creating an /etc/hosts
entry for zulipdev.com, but people don't always
know.

This fix moves the symptom slightly earlier in
the process--we don't advertise that the server
is "up" if you can't actually connect to it as
"zulipdev.com".
This commit is contained in:
Steve Howell 2020-03-28 20:16:52 +00:00 committed by Tim Abbott
parent b9d0d6edcb
commit 7e4d542df4
1 changed files with 2 additions and 1 deletions

View File

@ -45,7 +45,8 @@ def server_is_up(server, log_file):
assert_server_running(server, log_file)
try:
# We could get a 501 error if the reverse proxy is up but the Django app isn't.
return requests.get('http://127.0.0.1:9981/accounts/home').status_code == 200
# Note that zulipdev.com is mapped via DNS to 127.0.0.1.
return requests.get('http://zulipdev.com:9981/accounts/home').status_code == 200
except Exception:
return False