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

isis at torproject.org isis at torproject.org
Tue Feb 3 02:31:02 UTC 2015


commit d159b7706df446b1a84d7dd055ff95167b4f5aaa
Author: Isis Lovecruft <isis at torproject.org>
Date:   Wed Aug 27 07:58:25 2014 +0000

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

diff --git a/lib/bridgedb/test/test_https.py b/lib/bridgedb/test/test_https.py
index b8034d8..bb783fb 100644
--- a/lib/bridgedb/test/test_https.py
+++ b/lib/bridgedb/test/test_https.py
@@ -145,6 +145,9 @@ class HTTPTests(unittest.TestCase):
         return bridges
 
     def test_get_obfs2_ipv4(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.")
 
@@ -160,6 +163,9 @@ class HTTPTests(unittest.TestCase):
             self.assertEquals(PT, pt)
 
     def test_get_obfs3_ipv4(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.")
 
@@ -175,6 +181,9 @@ class HTTPTests(unittest.TestCase):
             self.assertEquals(PT, pt)
 
     def test_get_vanilla_ipv4(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.")
 
@@ -190,6 +199,9 @@ class HTTPTests(unittest.TestCase):
             self.assertTrue(bridge != None)
 
     def test_get_scramblesuit_ipv4(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.")
 





More information about the tor-commits mailing list