]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
split unit test into two, fix typo in comments 72/head
authorDmitry Borodaenko <angdraug@gmail.com>
Tue, 10 Sep 2013 21:40:09 +0000 (14:40 -0700)
committerDmitry Borodaenko <angdraug@gmail.com>
Tue, 10 Sep 2013 21:40:16 +0000 (14:40 -0700)
Signed-off-by: Dmitry Borodaenko <angdraug@gmail.com>
ceph_deploy/misc.py
ceph_deploy/tests/unit/test_mon.py

index 08d7ce3d2a7b8c4c8b9b3d6a245b2229ae9fd589..b4b8318ac2397df46cc66d2e349b0d2fbcf99141 100644 (file)
@@ -26,7 +26,7 @@ def mon_hosts(mons):
 def remote_shortname(socket):
     """
     Obtains remote hostname of the socket and cuts off the domain part
-    if it's FQDN.
+    of its FQDN.
     """
     return socket.gethostname().split('.', 1)[0]
 
index 7f0c601ef82e65f69b32c403beb82b4f637d3a1b..7ffb5ba78b8330893d2e1f722856f164f81ab3a9 100644 (file)
@@ -131,11 +131,12 @@ class TestCreateMon(object):
         result = hosts.mock_calls
         assert result == expected
 
-    def test_remote_shortname(self):
+    def test_remote_shortname_fqdn(self):
         socket = Mock()
         socket.gethostname.return_value = 'host.f.q.d.n'
         assert remote_shortname(socket) == 'host'
 
+    def test_remote_shortname_host(self):
         socket = Mock()
         socket.gethostname.return_value = 'host'
         assert remote_shortname(socket) == 'host'