summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTim Simpson <tim.simpson@rackspace.com>2012-11-16 11:50:34 -0600
committerTim Simpson <tim.simpson@rackspace.com>2012-11-19 12:33:40 -0600
commitc007356a7884b5690742683cac1e5b78f191456b (patch)
tree54332a3e3a2ce76177fd48fe51eaa2fea49c6d24 /bin
parenta07002375217fcef9bf5c0844d284daeefc6cc25 (diff)
downloadtrove-c007356a7884b5690742683cac1e5b78f191456b.tar.gz
Adding tests to Reddwarf.
The tests come from the Reddwarf Integration repository. wsgi_intercept is used to allow the test code to hit the server code directly. It also properly sets up the SqlLite database before each run. * Adds an "event simulator" which queues up functions that would normally be spawned with eventlet. The various sleep functions are then swapped with a method that runs these faux-events. * Adds many of the Reddwarf Integration tests. The idea is these could still run in a richer, real environment, but are running here enables us to quickly check feature breaks for each commit and lowers the learning curve necessary to test the API. The downside is some of these tests still have artifacts of their origins, such as (unused) classes to connect to MySQL databases. Some more work will be necessary to separate the "real mode" functionality of these tests further. Implements: blueprint tox-tests Change-Id: I9857f265c1cb46832906ef5e6a0c7bb4a092e637
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reddwarf-manage4
-rwxr-xr-xbin/start_server.sh6
2 files changed, 7 insertions, 3 deletions
diff --git a/bin/reddwarf-manage b/bin/reddwarf-manage
index b7afffbf..319fe3a1 100755
--- a/bin/reddwarf-manage
+++ b/bin/reddwarf-manage
@@ -59,7 +59,7 @@ class Commands(object):
def __init__(self, conf):
self.conf = conf
- def db_sync(self, repo_path=None):
+ def db_sync(self):
db_api.db_sync(self.conf, repo_path=None)
def db_upgrade(self, version=None, repo_path=None):
@@ -89,7 +89,7 @@ class Commands(object):
from reddwarf.instance import models
from reddwarf.db.sqlalchemy import session
db_api.drop_db(self.conf)
- self.db_sync(repo_path)
+ self.db_sync()
# Sets up database engine, so the next line will work...
session.configure_db(self.conf)
models.ServiceImage.create(service_name=service_name,
diff --git a/bin/start_server.sh b/bin/start_server.sh
index 3569ec8e..bfba17e7 100755
--- a/bin/start_server.sh
+++ b/bin/start_server.sh
@@ -1,6 +1,10 @@
#!/usr/bin/env bash
# Arguments: Use --pid_file to specify a pid file location.
-tox -e py26
+
+
+if [ ! -d ".tox/py26" ]; then
+ tox -epy26
+fi
function run() {
.tox/py26/bin/python $@