mirror of
https://github.com/mozilla-services/syncserver
synced 2024-11-18 09:25:59 +00:00
Merge pull request #15 from mozilla-services/cleanup
Miscellaneous cleanup
This commit is contained in:
commit
8e078475ed
60
Makefile
60
Makefile
@ -1,39 +1,39 @@
|
||||
SYSTEMPYTHON = `which python2 python | head -n 1`
|
||||
VIRTUALENV = virtualenv --python=$(SYSTEMPYTHON)
|
||||
PYTHON = local/bin/python
|
||||
NOSE = local/bin/nosetests -s
|
||||
FLAKE8 = local/bin/flake8
|
||||
PIP = local/bin/pip
|
||||
PIP_CACHE = /tmp/pip-cache.${USER}
|
||||
BUILD_TMP = /tmp/syncstorage-build.${USER}
|
||||
PYPI = https://pypi.python.org/simple
|
||||
INSTALL = $(PIP) install -U -i $(PYPI)
|
||||
ENV = ./local
|
||||
TOOLS := $(addprefix $(ENV)/bin/,flake8 nosetests)
|
||||
|
||||
.PHONY: all build test serve clean
|
||||
.PHONY: all
|
||||
all: build
|
||||
|
||||
all: build test
|
||||
.PHONY: build
|
||||
build: | $(ENV)
|
||||
$(ENV):
|
||||
$(VIRTUALENV) --no-site-packages $(ENV)
|
||||
$(ENV)/bin/pip install -r requirements.txt
|
||||
$(ENV)/bin/python ./setup.py develop
|
||||
|
||||
build:
|
||||
$(VIRTUALENV) --no-site-packages --distribute ./local
|
||||
$(INSTALL) --upgrade Distribute
|
||||
$(INSTALL) pip
|
||||
$(INSTALL) nose
|
||||
$(INSTALL) flake8
|
||||
$(INSTALL) -r requirements.txt
|
||||
$(PYTHON) ./setup.py develop
|
||||
.PHONY: test
|
||||
test: | $(TOOLS)
|
||||
$(ENV)/bin/flake8 ./syncserver
|
||||
$(ENV)/bin/nosetests -s syncstorage.tests
|
||||
# Tokenserver tests currently broken due to incorrect file paths
|
||||
# $(ENV)/bin/nosetests -s tokenserver.tests
|
||||
|
||||
test:
|
||||
# Basic syntax and sanity checks.
|
||||
$(FLAKE8) ./syncserver
|
||||
# Testcases from syncstorage app
|
||||
$(NOSE) syncstorage.tests
|
||||
# Testcases from tokenserver app; broken due to incorrect file paths
|
||||
#$(NOSE) tokenserver.tests
|
||||
# Live tests against a running server.
|
||||
./local/bin/pserve syncserver/tests.ini & SERVER_PID=$$! ; sleep 2 ; ./local/bin/python -m syncstorage.tests.functional.test_storage --use-token-server http://localhost:5000/token/1.0/sync/1.5 ; kill $$SERVER_PID
|
||||
# Test against a running server
|
||||
$(ENV)/bin/pserve syncserver/tests.ini & SERVER_PID=$$!; \
|
||||
sleep 2; \
|
||||
$(ENV)/bin/python -m syncstorage.tests.functional.test_storage \
|
||||
--use-token-server http://localhost:5000/token/1.0/sync/1.5; \
|
||||
kill $$SERVER_PID
|
||||
|
||||
serve:
|
||||
./local/bin/pserve ./syncserver.ini
|
||||
$(TOOLS): | $(ENV)
|
||||
$(ENV)/bin/pip install nose flake8
|
||||
|
||||
.PHONY: serve
|
||||
serve: | $(ENV)
|
||||
$(ENV)/bin/pserve ./syncserver.ini
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf ./local
|
||||
rm -rf $(ENV)
|
||||
|
@ -4,27 +4,22 @@ Chameleon==2.14
|
||||
chardet==2.2.1
|
||||
circus==0.10
|
||||
cornice==0.16.2
|
||||
coverage==3.7.1
|
||||
docutils==0.11
|
||||
flake8==2.1.0
|
||||
gevent==1.0
|
||||
greenlet==0.4.1
|
||||
hawkauthlib==0.1.1
|
||||
Jinja2==2.7.1
|
||||
Mako==0.9.1
|
||||
MarkupSafe==0.18
|
||||
mccabe==0.2.1
|
||||
metlog-py==0.10
|
||||
ordereddict==1.1
|
||||
Paste==1.7.5.1
|
||||
PasteDeploy==1.5.2
|
||||
PasteScript==1.7.5
|
||||
pep8==1.4.6
|
||||
powerhose==0.7
|
||||
protobuf==2.5
|
||||
psutil==1.2.1
|
||||
PyBrowserID==0.9.1
|
||||
pyflakes==0.7.3
|
||||
Pygments==1.6
|
||||
PyMySQL==0.6.1
|
||||
pymysql_sa==1.0
|
||||
|
@ -62,8 +62,7 @@ def includeme(config):
|
||||
settings["browserid.backend"] = "tokenserver.verifiers.RemoteVerifier"
|
||||
settings["browserid.audiences"] = public_url
|
||||
if "metlog.backend" not in settings:
|
||||
# Default to capturing metlog output in memory.
|
||||
# In other words, stop of from being so damn chatty on stdout.
|
||||
# Default to sending metlog output to stdout.
|
||||
settings["metlog.backend"] = "mozsvc.metrics.MetlogPlugin"
|
||||
settings["metlog.sender_class"] = "metlog.senders.StdOutSender"
|
||||
settings["metlog.enabled"] = True
|
||||
|
@ -15,3 +15,9 @@ public_url = http://localhost:5000/
|
||||
|
||||
# This is a secret key used for signing authentication tokens.
|
||||
#secret = INSERT_SECRET_KEY_HERE
|
||||
|
||||
# Enable metlog during tests, but do not log normal traffic to stdout.
|
||||
[metlog]
|
||||
backend = "mozsvc.metrics.MetlogPlugin"
|
||||
sender_class = "metlog.senders.DebugCaptureSender"
|
||||
enabled = True
|
||||
|
Loading…
Reference in New Issue
Block a user