summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2019-04-23 09:56:09 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2019-04-23 09:56:09 +0800
commite6e870a0e3cb7293802e990882bb91a0cacc97fe (patch)
treebc65ad718af15199edc7d9ac836438f78ba7df7c
parent65b27452d96a4c49395238588615c133b3ffd1e8 (diff)
Add vnf heal ut case
Change-Id: If02adf6cd1727e68946cbeaa63a0b6f909064fbb Issue-ID: VFC-1306 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r--lcm/lcm/nf/tests/test_heal_vnf.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/lcm/lcm/nf/tests/test_heal_vnf.py b/lcm/lcm/nf/tests/test_heal_vnf.py
index bde15e16..ee872edf 100644
--- a/lcm/lcm/nf/tests/test_heal_vnf.py
+++ b/lcm/lcm/nf/tests/test_heal_vnf.py
@@ -64,6 +64,23 @@ class TestNFInstantiate(TestCase):
self.failUnlessEqual(status.HTTP_409_CONFLICT, response.status_code)
NfInstModel.objects.filter(nfinstid='1267').delete()
+ def test_change_ext_conn_inner_error(self):
+ NfInstModel(nfinstid='345',
+ nf_name='VNF1',
+ nf_desc="VNF DESC",
+ vnfdid="1",
+ netype="XGW",
+ vendor="ZTE",
+ vnfSoftwareVersion="V1",
+ version="V1",
+ package_id="2",
+ status='INSTANTIATED').save()
+ url = "/api/vnflcm/v1/vnf_instances/345/heal"
+ response = self.client.post(url,
+ data={"additionalParams": "1"},
+ format='json')
+ self.failUnlessEqual(status.HTTP_500_INTERNAL_SERVER_ERROR, response.status_code)
+
@mock.patch.object(HealVnf, 'run')
def test_heal_vnf_success(self, mock_run):
req_data = {}