@mock.patch('kuryr_kubernetes.cni.plugins.k8s_cni_registry.K8sCNIRegistryPlugin.report_drivers_health')
@mock.patch('os.getpid', mock.Mock(return_value=123))
@mock.patch('kuryr_kubernetes.linux_net_utils.create_ovs_vif_port')
def test_connect(self, mock_create_ovs, m_report):
    self._test_connect(report=m_report)
    self.assertEqual(3, self.h_ipdb_exit.call_count)
    self.assertEqual(2, self.c_ipdb_exit.call_count)
    self.c_ipdb.create.assert_called_once_with(ifname=self.ifname, peer='h_interface', kind='veth')
    self.assertEqual(1, self.m_create.mtu)
    self.assertEqual(str(self.vif.address), self.m_create.address)
    self.m_create.up.assert_called_once_with()
    self.assertEqual(123, self.m_h_iface.net_ns_pid)
    self.assertEqual(1, self.m_h_iface.mtu)
    self.m_h_iface.up.assert_called_once_with()
    mock_create_ovs.assert_called_once_with('bridge', 'h_interface', '89eccd45-43e9-43d8-b4cc-4c13db13f782', '3e:94:b7:31:a0:83', 'kuryr')
@mock.patch('kuryr_kubernetes.cni.plugins.k8s_cni_registry.K8sCNIRegistryPlugin.report_drivers_health')
@mock.patch('os.getpid', mock.Mock(return_value=123))
@mock.patch('kuryr_kubernetes.linux_net_utils.create_ovs_vif_port')
def test_connect(self, mock_create_ovs, m_report):
    self._test_connect(report=m_report)
    self.assertEqual(3, self.h_ipdb_exit.call_count)
    self.assertEqual(2, self.c_ipdb_exit.call_count)
    self.c_ipdb.create.assert_called_once_with(ifname=self.ifname, peer='h_interface', kind='veth')
    self.assertEqual(1, self.m_create.mtu)
    self.assertEqual(str(self.vif.address), self.m_create.address)
    self.m_create.up.assert_called_once_with()
    self.assertEqual(123, self.m_h_iface.net_ns_pid)
    self.assertEqual(1, self.m_h_iface.mtu)
    self.m_h_iface.up.assert_called_once_with()
    mock_create_ovs.assert_called_once_with('bridge', 'h_interface', '89eccd45-43e9-43d8-b4cc-4c13db13f782', '3e:94:b7:31:a0:83', 'kuryr')