mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 09:58:06 +00:00
frontend_tests/run-casper: Fix annotations.
This commit is contained in:
@@ -9,7 +9,7 @@ import glob
|
|||||||
try:
|
try:
|
||||||
# We don't actually need typing, but it's a good guard for being
|
# We don't actually need typing, but it's a good guard for being
|
||||||
# outside a Zulip virtualenv.
|
# outside a Zulip virtualenv.
|
||||||
import typing
|
from typing import Iterable
|
||||||
import requests
|
import requests
|
||||||
except ImportError as e:
|
except ImportError as e:
|
||||||
print("ImportError: {}".format(e))
|
print("ImportError: {}".format(e))
|
||||||
@@ -48,13 +48,13 @@ subprocess.check_call(['rm', '-f'] + glob.glob('/tmp/casper-failure*.png'))
|
|||||||
log = open('frontend_tests/casper_tests/server.log', 'w')
|
log = open('frontend_tests/casper_tests/server.log', 'w')
|
||||||
|
|
||||||
def assert_server_running(server):
|
def assert_server_running(server):
|
||||||
# type: () -> None
|
# type: (subprocess.Popen) -> None
|
||||||
"""Get the exit code of the server, or None if it is still running."""
|
"""Get the exit code of the server, or None if it is still running."""
|
||||||
if server.poll() is not None:
|
if server.poll() is not None:
|
||||||
raise RuntimeError('Server died unexpectedly! Check frontend_tests/casper_tests/server.log')
|
raise RuntimeError('Server died unexpectedly! Check frontend_tests/casper_tests/server.log')
|
||||||
|
|
||||||
def server_is_up(server):
|
def server_is_up(server):
|
||||||
# type: () -> bool
|
# type: (subprocess.Popen) -> bool
|
||||||
assert_server_running(server)
|
assert_server_running(server)
|
||||||
try:
|
try:
|
||||||
# We could get a 501 error if the reverse proxy is up but the Django app isn't.
|
# We could get a 501 error if the reverse proxy is up but the Django app isn't.
|
||||||
@@ -63,6 +63,7 @@ def server_is_up(server):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def run_tests(files):
|
def run_tests(files):
|
||||||
|
# type: (Iterable[str]) -> None
|
||||||
test_files = []
|
test_files = []
|
||||||
for file in files:
|
for file in files:
|
||||||
if not os.path.exists(file):
|
if not os.path.exists(file):
|
||||||
|
|||||||
@@ -57,7 +57,6 @@ api/integrations/twitter/twitter-search-bot
|
|||||||
bots/check-mirroring
|
bots/check-mirroring
|
||||||
bots/gcal-bot
|
bots/gcal-bot
|
||||||
bots/githook-post-receive
|
bots/githook-post-receive
|
||||||
frontend_tests/run-casper
|
|
||||||
puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_send_receive_time
|
puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_send_receive_time
|
||||||
tools/check-templates
|
tools/check-templates
|
||||||
tools/compile-handlebars-templates
|
tools/compile-handlebars-templates
|
||||||
|
|||||||
Reference in New Issue
Block a user