Skip to content

Commit

Permalink
fig testing
Browse files Browse the repository at this point in the history
  • Loading branch information
gleicon committed Oct 21, 2014
1 parent c56d23c commit d7f13e5
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 1 deletion.
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM ubuntu:14.04
MAINTAINER Gleicon <gleicon@gmail.com>

RUN apt-get update && \
apt-get -y upgrade && \
apt-get -y install -q build-essential && \
apt-get -y install -q python-dev libffi-dev libssl-dev python-pip

RUN pip install service_identity pycrypto && \
pip install twisted && \
pip install hiredis

ADD . /txredisapi
CMD ["bash"]

6 changes: 6 additions & 0 deletions README.tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Docker and Fig testing for txredisapi:

- Install Fig and its dependencies (http://www.fig.sh/install.html)
- fig up


12 changes: 12 additions & 0 deletions fig.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
web:
build: .
working_dir: /txredisapi
command: trial tests
ports:
- "8000:8000"
links:
- dbredis
volumes:
- .:/txredisapi
dbredis:
image: redis
9 changes: 8 additions & 1 deletion tests/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,15 @@

from twisted.trial import unittest
from twisted.internet import defer
import os

s = os.getenv("DBREDIS_1_PORT_6379_TCP_ADDR")

if s is not None:
REDIS_HOST = "dbredis_1"
else:
REDIS_HOST = "localhost"

REDIS_HOST = "localhost"
REDIS_PORT = 6379


Expand Down

0 comments on commit d7f13e5

Please sign in to comment.