def nbd_server(config): server_id = str(uuid.uuid4()) nbd_url = nbd.start_server(server_id, config) try: yield nbd_url finally: nbd.stop_server(server_id)
def nbd_server(config): server_id = str(uuid.uuid4()) nbd_url = nbd.start_server(server_id, config) try: yield nbd_url finally: nbd.stop_server(server_id)
def test_stop_server_not_running(): # Stopping non-existing server should succeed. nbd.stop_server("no-such-server-uuid")
def test_stop_server_not_running(): # Stopping non-existing server should succeed. nbd.stop_server("no-such-server-uuid")