[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [bridgedb/master] Fail test_smtp.py tests if we couldn't start BridgeDB process on CI servers.



commit 77f08d955407b9ed935ce7c766db8481587569a9
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date:   Wed Aug 27 08:03:44 2014 +0000

    Fail test_smtp.py tests if we couldn't start BridgeDB process on CI servers.
---
 lib/bridgedb/test/test_smtp.py |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/bridgedb/test/test_smtp.py b/lib/bridgedb/test/test_smtp.py
index 176492f..cc9e79c 100644
--- a/lib/bridgedb/test/test_smtp.py
+++ b/lib/bridgedb/test/test_smtp.py
@@ -129,6 +129,9 @@ class SMTPTests(unittest.TestCase):
         self.server.stop()
 
     def test_getBridges(self):
+        if os.environ.get("CI"):
+            if not self.pid or not processExists(self.pid):
+                raise FailTest("Could not start BridgeDB process on CI server!")
         if not self.pid or not processExists(self.pid):
             raise SkipTest("Can't run test: no BridgeDB process running.")
 
@@ -141,6 +144,9 @@ class SMTPTests(unittest.TestCase):
         self.server.getAndCheckMessageContains("Here are your bridges")
 
     def test_getBridges_rateLimitExceeded(self):
+        if os.environ.get("CI"):
+            if not self.pid or not processExists(self.pid):
+                raise FailTest("Could not start BridgeDB process on CI server!")
         if not self.pid or not processExists(self.pid):
             raise SkipTest("Can't run test: no BridgeDB process running.")
 
@@ -170,6 +176,9 @@ class SMTPTests(unittest.TestCase):
         '''Sends a large number of emails in a short period of time, and checks
         that a response is received for each message.
         '''
+        if os.environ.get("CI"):
+            if not self.pid or not processExists(self.pid):
+                raise FailTest("Could not start BridgeDB process on CI server!")
         if not self.pid or not processExists(self.pid):
             raise SkipTest("Can't run test: no BridgeDB process running.")
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits