mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
pymessaging: Add irpc_remove_name
This allows tests to be indirectly added for server_id_db_lookup() and server_id_db_prune_name() Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> BUG: https://bugzilla.samba.org/show_bug.cgi?id=12705
This commit is contained in:
@ -22,6 +22,7 @@ import samba
|
||||
from samba.messaging import Messaging
|
||||
from samba.tests import TestCase
|
||||
from samba.dcerpc.server_id import server_id
|
||||
from samba.ndr import ndr_print
|
||||
|
||||
class MessagingTests(TestCase):
|
||||
|
||||
@ -52,6 +53,13 @@ class MessagingTests(TestCase):
|
||||
def test_add_name(self):
|
||||
x = self.get_context()
|
||||
x.irpc_add_name("samba.messaging test")
|
||||
name_list = x.irpc_servers_byname("samba.messaging test")
|
||||
self.assertEqual(len(name_list), 1)
|
||||
self.assertEqual(ndr_print(x.server_id),
|
||||
ndr_print(name_list[0]))
|
||||
x.irpc_remove_name("samba.messaging test")
|
||||
self.assertEqual([],
|
||||
x.irpc_servers_byname("samba.messaging test"))
|
||||
|
||||
def test_ping_speed(self):
|
||||
server_ctx = self.get_context((0, 1))
|
||||
|
Reference in New Issue
Block a user