diff --git a/octavia/tests/unit/amphorae/backends/agent/api_server/test_amphora_info.py b/octavia/tests/unit/amphorae/backends/agent/api_server/test_amphora_info.py index 1ea7351910..2aba7a7c4a 100644 --- a/octavia/tests/unit/amphorae/backends/agent/api_server/test_amphora_info.py +++ b/octavia/tests/unit/amphorae/backends/agent/api_server/test_amphora_info.py @@ -64,20 +64,6 @@ class TestAmphoraInfo(base.TestCase): self.assertEqual(1, result) def test__get_meminfo(self): - - # Test live data from host - - result = self.amp_info._get_meminfo() - - # check that /proc/meminfo is giving us the fields we use - self.assertIn('MemTotal', result) - self.assertIn('MemFree', result) - self.assertIn('Buffers', result) - self.assertIn('Cached', result) - self.assertIn('SwapCached', result) - self.assertIn('Shmem', result) - self.assertIn('Slab', result) - # Known data test meminfo = ('MemTotal: 21692784 kB\n' 'MemFree: 12685624 kB\n' diff --git a/octavia/tests/unit/amphorae/backends/agent/api_server/test_listener.py b/octavia/tests/unit/amphorae/backends/agent/api_server/test_listener.py index b8fbe75661..d2b9b8b4c6 100644 --- a/octavia/tests/unit/amphorae/backends/agent/api_server/test_listener.py +++ b/octavia/tests/unit/amphorae/backends/agent/api_server/test_listener.py @@ -34,6 +34,8 @@ class ListenerTestCase(base.TestCase): self.jinja_cfg = jinja_cfg.JinjaTemplater( base_amp_path=BASE_AMP_PATH, base_crt_dir=BASE_CRT_PATH) + self.mock_platform = mock.patch("platform.linux_distribution").start() + self.mock_platform.return_value = ("Ubuntu",) self.test_listener = listener.Listener() def test_parse_haproxy_config(self): diff --git a/octavia/tests/unit/amphorae/backends/agent/api_server/test_plug.py b/octavia/tests/unit/amphorae/backends/agent/api_server/test_plug.py index a6cfaa155c..469cc1594f 100644 --- a/octavia/tests/unit/amphorae/backends/agent/api_server/test_plug.py +++ b/octavia/tests/unit/amphorae/backends/agent/api_server/test_plug.py @@ -37,6 +37,8 @@ class TestPlug(base.TestCase): def setUp(self): super(TestPlug, self).setUp() self.mock_netifaces = mock.patch.object(plug, "netifaces").start() + self.mock_platform = mock.patch("platform.linux_distribution").start() + self.mock_platform.return_value = ("Ubuntu",) self.osutil = osutils.BaseOS.get_os_util() self.test_plug = plug.Plug(self.osutil) self.addCleanup(self.mock_netifaces.stop) @@ -157,6 +159,8 @@ class TestPlug(base.TestCase): class TestPlugNetwork(base.TestCase): def setUp(self): super(TestPlugNetwork, self).setUp() + self.mock_platform = mock.patch("platform.linux_distribution").start() + self.mock_platform.return_value = ("Ubuntu",) self.osutil = osutils.BaseOS.get_os_util() self.test_plug = plug.Plug(self.osutil)