From c0e83bc50ff0f0ce77a87f43ab514735a1c8343b Mon Sep 17 00:00:00 2001 From: Deepak S Date: Sun, 17 Sep 2017 20:58:43 -0700 Subject: Disable VNF deploy by default Change-Id: I27bcc41c855f34fb1fd0332fc24e7bf0b2af4ec2 Signed-off-by: Deepak S Signed-off-by: Ross Brattain --- tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py | 5 +++-- tests/unit/network_services/vnf_generic/vnf/test_udp_replay.py | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'tests/unit/network_services') diff --git a/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py index 4d53f0989..1e6bc1a13 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py @@ -1516,8 +1516,9 @@ class TestSampleVNFDeployHelper(unittest.TestCase): sample_vnf_deploy_helper = SampleVNFDeployHelper(vnfd_helper, ssh_helper) self.assertIsNone(sample_vnf_deploy_helper.deploy_vnfs('name1')) - self.assertEqual(ssh_helper.execute.call_count, 0) - self.assertEqual(ssh_helper.put.call_count, 0) + sample_vnf_deploy_helper.DISABLE_DEPLOY = True + self.assertEqual(ssh_helper.execute.call_count, 5) + self.assertEqual(ssh_helper.put.call_count, 1) @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.time') @mock.patch('subprocess.check_output') diff --git a/tests/unit/network_services/vnf_generic/vnf/test_udp_replay.py b/tests/unit/network_services/vnf_generic/vnf/test_udp_replay.py index 39b37c606..d4d3439f3 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_udp_replay.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_udp_replay.py @@ -444,6 +444,8 @@ class TestUdpReplayApproxVnf(unittest.TestCase): udp_replay_approx_vnf.WAIT_TIME = 0 udp_replay_approx_vnf.setup_helper.setup_vnf_environment = mock.Mock() + udp_replay_approx_vnf.deploy_helper = mock.MagicMock() + udp_replay_approx_vnf.deploy_vnfs = mock.MagicMock() self.assertIsNone(udp_replay_approx_vnf.instantiate(self.SCENARIO_CFG, self.CONTEXT_CFG)) udp_replay_approx_vnf._vnf_process.is_alive = mock.Mock(return_value=1) @@ -460,6 +462,7 @@ class TestUdpReplayApproxVnf(unittest.TestCase): udp_replay_approx_vnf.q_out.put("some text PANIC some text") udp_replay_approx_vnf.setup_helper.setup_vnf_environment = mock.Mock() + udp_replay_approx_vnf.deploy_helper = mock.MagicMock() self.assertIsNone(udp_replay_approx_vnf.instantiate(self.SCENARIO_CFG, self.CONTEXT_CFG)) with self.assertRaises(RuntimeError): udp_replay_approx_vnf.wait_for_instantiate() -- cgit 1.2.3-korg