1
0
Fork 0
mirror of https://github.com/shouptech/humulus.git synced 2026-02-03 14:49:42 +00:00

fix test config

This commit is contained in:
Emma 2019-06-27 13:17:03 -06:00
parent 5451d7bf74
commit 0c761a8319
3 changed files with 7 additions and 11 deletions

View file

@ -12,12 +12,11 @@ steps:
- name: test
image: python:3.6
commands:
# Wait for couch
- until curl 'http://couchdb:5984' ; do sleep 1 ; done
# Configure settings
- export HUMULUS_SETTINGS="$(pwd)/testsettings.py"
# Run tests
# Install pre-requisites
- pip install coverage pytest
- pip install -e .
# Wait for couch
- until curl 'http://couchdb:5984' ; do sleep 1 ; done
# Run tests
- coverage run -m pytest
- coverage report -m

View file

@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import uuid
import pytest
@ -22,8 +23,9 @@ from humulus.couch import build_couch, get_couch, put_doc
@pytest.fixture
def app():
dbname = 'test_{}'.format(str(uuid.uuid4()))
couchurl = os.environ.get('COUCH_URL', 'http://127.0.0.1:5984')
app = create_app({
'COUCH_URL': 'http://127.0.0.1:5984',
'COUCH_URL': couchurl,
'COUCH_USERNAME': 'admin',
'COUCH_PASSWORD': 'password',
'COUCH_DATABASE': dbname,

View file

@ -1,5 +0,0 @@
SECRET_KEY = b'dev'
COUCH_URL='http://couchdb:5984'
COUCH_USERNAME='admin'
COUCH_PASSWORD='password'
COUCH_DATABASE='humulus'