Skip to content

Commit

Permalink
- Fix Travis tests
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed Mar 17, 2019
1 parent 03b2387 commit d54cb85
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ matrix:
ON_TRAVIS: 'True'
TEST_RUN_CORE: 'True'
MONITORING_ENABLED: 'False'
SESSION_EXPIRED_CONTROL_ENABLED: 'False'
- name: "GeoServer-backend Contrib Apps Smoke Tests"
python: 2.7
virtualenv:
Expand All @@ -47,6 +48,7 @@ matrix:
ON_TRAVIS: 'True'
TEST_RUN_INTERNAL_APPS: 'True'
MONITORING_ENABLED: 'False'
SESSION_EXPIRED_CONTROL_ENABLED: 'True'
- name: "GeoServer-backend Integration Tests"
python: 2.7
virtualenv:
Expand All @@ -62,6 +64,7 @@ matrix:
TEST_RUN_INTEGRATION_CSW: 'False'
TEST_RUN_INTEGRATION_BDD: 'False'
MONITORING_ENABLED: 'False'
SESSION_EXPIRED_CONTROL_ENABLED: 'True'
CELERY_ALWAYS_EAGER: 'True'
- name: "GeoServer-backend Integration CSW Tests"
python: 2.7
Expand All @@ -78,6 +81,7 @@ matrix:
TEST_RUN_INTEGRATION_CSW: 'True'
TEST_RUN_INTEGRATION_BDD: 'False'
MONITORING_ENABLED: 'False'
SESSION_EXPIRED_CONTROL_ENABLED: 'False'
CELERY_ALWAYS_EAGER: 'True'
- name: "GeoServer-backend Integration BDD Tests"
python: 2.7
Expand All @@ -94,6 +98,7 @@ matrix:
TEST_RUN_INTEGRATION_CSW: 'False'
TEST_RUN_INTEGRATION_BDD: 'True'
MONITORING_ENABLED: 'False'
SESSION_EXPIRED_CONTROL_ENABLED: 'False'
CELERY_ALWAYS_EAGER: 'True'
- name: "QGis Server-backend Core Modules Smoke Tests"
python: 2.7
Expand All @@ -112,6 +117,7 @@ matrix:
ON_TRAVIS: 'True'
TEST_RUN_CORE: 'True'
MONITORING_ENABLED: 'False'
SESSION_EXPIRED_CONTROL_ENABLED: 'False'
CELERY_ALWAYS_EAGER: 'True'
- name: "QGis Server-backend Contrib Apps Smoke Tests"
python: 2.7
Expand All @@ -130,6 +136,7 @@ matrix:
ON_TRAVIS: 'True'
TEST_RUN_INTERNAL_APPS: 'True'
MONITORING_ENABLED: 'False'
SESSION_EXPIRED_CONTROL_ENABLED: 'False'
CELERY_ALWAYS_EAGER: 'True'
- name: "QGis Server-backend Integration Tests"
python: 2.7
Expand All @@ -148,6 +155,7 @@ matrix:
ON_TRAVIS: 'True'
TEST_RUN_INTEGRATION: 'True'
MONITORING_ENABLED: 'False'
SESSION_EXPIRED_CONTROL_ENABLED: 'False'
CELERY_ALWAYS_EAGER: 'True'
- name: "Selenium Integration Tests"
python: 3.5
Expand Down
4 changes: 0 additions & 4 deletions geonode/geoserver/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,10 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#########################################################################
import logging
import requests

from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry

logger = logging.getLogger(__name__)

requests.packages.urllib3.disable_warnings()


Expand Down
2 changes: 1 addition & 1 deletion geonode/security/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class SessionControlMiddleware(object):
redirect_to = getattr(settings, 'LOGIN_URL', reverse('account_login'))

def process_request(self, request):
if request and request.user:
if request and request.user and not request.user.is_anonymous:
if not request.user.is_active:
self.do_logout(request)
elif check_ogc_backend(geoserver.BACKEND_PACKAGE):
Expand Down
2 changes: 1 addition & 1 deletion geonode/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@
'GEOGIG_ENABLED': False,
'WMST_ENABLED': False,
'BACKEND_WRITE_ENABLED': True,
'WPS_ENABLED': False,
'WPS_ENABLED': True,
'LOG_FILE': '%s/geoserver/data/logs/geoserver.log'
% os.path.abspath(os.path.join(PROJECT_ROOT, os.pardir)),
# Set to name of database in DATABASES dictionary to enable
Expand Down
1 change: 1 addition & 0 deletions scripts/spcgeonode/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ x-common-django:
- MEDIA_URL=/uploaded/
- GEOSERVER_LOCATION=http://nginx/geoserver/
- ASYNC_SIGNALS=True
- SESSION_EXPIRED_CONTROL_ENABLED=False
# TODO : we should probably remove this and set Celery to use JSON serialization instead of pickle
- C_FORCE_ROOT=True
# We get an exception after migrations on startup (it seems the monitoring app tries to resolve the geoserver domain name after it's migration, which can happen before oauth migrations on which geoserver startup depends...)
Expand Down

0 comments on commit d54cb85

Please sign in to comment.