Skip to content
Permalink
Browse files

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.
  • Loading branch information...
dalf committed Jul 6, 2019
1 parent 69c8ad8 commit 3faaf34e25db09988b113f74feb6227d3df3db95
Showing with 14 additions and 4 deletions.
  1. +1 −1 manage.sh
  2. +2 −2 requirements-dev.txt
  3. +8 −0 searx/settings_robot.yml
  4. +3 −1 searx/testing.py
@@ -35,7 +35,7 @@ install_geckodriver() {
if [ -z "$NOTFOUND" ]; then
return
fi
GECKODRIVER_VERSION="v0.19.1"
GECKODRIVER_VERSION="v0.24.0"
PLATFORM="`python -c "import six; import platform; six.print_(platform.system().lower(), platform.architecture()[0])"`"
case "$PLATFORM" in
"linux 32bit" | "linux2 32bit") ARCH="linux32";;
@@ -4,8 +4,8 @@ nose2[coverage_plugin]
cov-core==1.15.0
pep8==1.7.0
plone.testing==5.0.0
splinter==0.7.5
splinter==0.11.0
transifex-client==0.12.2
unittest2==1.1.0
zope.testrunner==4.5.1
selenium==3.5.0
selenium==3.141.0
@@ -39,3 +39,11 @@ engines:
locales:
en : English
hu : Magyar

doi_resolvers :
oadoi.org : 'https://oadoi.org/'
doi.org : 'https://doi.org/'
doai.io : 'http://doai.io/'
sci-hub.tw : 'http://sci-hub.tw/'

default_doi_resolver : 'oadoi.org'
@@ -6,7 +6,6 @@
import subprocess
import traceback


from os.path import dirname, join, abspath

from splinter import Browser
@@ -49,6 +48,7 @@ def setUp(self):
exe = 'python'

# set robot settings path
os.environ['SEARX_DEBUG'] = '1'
os.environ['SEARX_SETTINGS_PATH'] = abspath(
dirname(__file__) + '/settings_robot.yml')

@@ -58,6 +58,8 @@ def setUp(self):
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT
)
if hasattr(self.server.stdout, 'read1'):
print(self.server.stdout.read1(1024).decode('utf-8'))

def tearDown(self):
os.kill(self.server.pid, 9)

0 comments on commit 3faaf34

Please sign in to comment.
You can’t perform that action at this time.