diff options
| author | Dolph Mathews <dolph.mathews@rackspace.com> | 2011-07-01 17:10:35 -0500 |
|---|---|---|
| committer | Dolph Mathews <dolph.mathews@rackspace.com> | 2011-07-01 17:10:35 -0500 |
| commit | 9faae5d0e42bbb7b06b51b9ac15ce6babc8f7727 (patch) | |
| tree | fa0de3840b4958130a60b28384ffe2c3909ec943 | |
| parent | 79d110e33ba328c671e5e9fa375b76b8a0a1422b (diff) | |
Added test automation script
| -rw-r--r-- | keystone/test/run_tests.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/keystone/test/run_tests.py b/keystone/test/run_tests.py new file mode 100644 index 00000000..b1292fc4 --- /dev/null +++ b/keystone/test/run_tests.py @@ -0,0 +1,26 @@ +import subprocess +import time + +if __name__ == '__main__': + #remove pre-existing test databases + subprocess.call(['rm', 'keystone.db']) + subprocess.call(['rm', 'keystone.token.db']) + + # populate the test database + subprocess.call(['../../bin/sampledata.sh']) + + # run the keystone server + server = subprocess.Popen(['../../bin/keystone']) + + # blatent hack. + time.sleep(3) + + # run tests + subprocess.call(['python', 'unit/test_keystone.py']) + + #kill the keystone server + server.kill() + + # remove test databases + subprocess.call(['rm', 'keystone.db']) + subprocess.call(['rm', 'keystone.token.db']) |
