Test AsyncStreamServer with abstract unix sockets
authorGuido Trotter <ultrotter@google.com>
Tue, 19 Feb 2013 22:41:19 +0000 (14:41 -0800)
committerGuido Trotter <ultrotter@google.com>
Wed, 27 Feb 2013 21:47:40 +0000 (13:47 -0800)
This was meant to be since "the beginning" but was never submitted as
somehow it failed with python 2.4. Now that the minimum python version
has been increased it can be added.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

test/py/ganeti.daemon_unittest.py

index 5be22dd..e337065 100755 (executable)
@@ -598,6 +598,15 @@ class TestAsyncStreamServerUnixPath(TestAsyncStreamServerTCP):
     TestAsyncStreamServerTCP.tearDown(self)
 
 
+class TestAsyncStreamServerUnixAbstract(TestAsyncStreamServerTCP):
+  """Test daemon.AsyncStreamServer with a Unix abstract connection"""
+
+  family = socket.AF_UNIX
+
+  def getAddress(self):
+    return "\0myabstractsocketaddress"
+
+
 class TestAsyncAwaker(testutils.GanetiTestCase):
   """Test daemon.AsyncAwaker"""