on master help sign in
Fix ./manage.sh robot_tests (#1633)

doi_resolvers / default_doi_resolver were missing in the settings_robots.yml file, so the test server was not able to start (crash). Since the output wasn't displayed, it was not obvious why the Selenium couldn't connect to searx.

commit3faaf34e25db09988b113f74feb6227d3df3db95 authorAlexandre Flament <alex@al-f.net> dateSat 6 Jul 2019, 18:47 (7 years ago) parent69c8ad8
4 files changed+14−4
manage.sh+1−1 requirements-dev.txt+2−2 searx/settings_robot.yml+8 searx/testing.py+3−1
manage.sh+1−1
@@ -35,7 +35,7 @@ install_geckodriver() {
3535 if [ -z "$NOTFOUND" ]; then
3636 return
3737 fi
38− GECKODRIVER_VERSION="v0.19.1"
38+ GECKODRIVER_VERSION="v0.24.0"
3939 PLATFORM="`python -c "import six; import platform; six.print_(platform.system().lower(), platform.architecture()[0])"`"
4040 case "$PLATFORM" in
4141 "linux 32bit" | "linux2 32bit") ARCH="linux32";;
requirements-dev.txt+2−2
@@ -4,8 +4,8 @@ nose2[coverage_plugin]
44cov-core==1.15.0
55pep8==1.7.0
66plone.testing==5.0.0
7−splinter==0.7.5
7+splinter==0.11.0
88transifex-client==0.12.2
99unittest2==1.1.0
1010zope.testrunner==4.5.1
11−selenium==3.5.0
11+selenium==3.141.0
searx/settings_robot.yml+8
@@ -39,3 +39,11 @@ engines:
3939locales:
4040 en : English
4141 hu : Magyar
42+
43+doi_resolvers :
44+ oadoi.org : 'https://oadoi.org/'
45+ doi.org : 'https://doi.org/'
46+ doai.io : 'http://doai.io/'
47+ sci-hub.tw : 'http://sci-hub.tw/'
48+
49+default_doi_resolver : 'oadoi.org'
searx/testing.py+3−1
@@ -6,7 +6,6 @@ import os
66import subprocess
77import traceback
88
9−
109from os.path import dirname, join, abspath
1110
1211from splinter import Browser
@@ -49,6 +48,7 @@ class SearxRobotLayer():
4948 exe = 'python'
5049
5150 # set robot settings path
51+ os.environ['SEARX_DEBUG'] = '1'
5252 os.environ['SEARX_SETTINGS_PATH'] = abspath(
5353 dirname(__file__) + '/settings_robot.yml')
5454
@@ -58,6 +58,8 @@ class SearxRobotLayer():
5858 stdout=subprocess.PIPE,
5959 stderr=subprocess.STDOUT
6060 )
61+ if hasattr(self.server.stdout, 'read1'):
62+ print(self.server.stdout.read1(1024).decode('utf-8'))
6163
6264 def tearDown(self):
6365 os.kill(self.server.pid, 9)