summaryrefslogtreecommitdiffstats
path: root/lcm
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2019-04-23 10:23:21 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2019-04-23 10:23:21 +0800
commitc43fcb791d0b1f2de826e3e997b9680d6e2edca7 (patch)
treeea7e7dc8cab702412c2b3cbb19c5c4d31b4e5464 /lcm
parentb7ce947789670cb3286038c175e9d3ac01480a87 (diff)
Add scale to levle ut case
Change-Id: I6182ad75e7894a1db7af13a79fe8f6e69b330e66 Issue-ID: VFC-1306 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
Diffstat (limited to 'lcm')
-rw-r--r--lcm/lcm/nf/tests/test_scale_vnf_to_level.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/lcm/lcm/nf/tests/test_scale_vnf_to_level.py b/lcm/lcm/nf/tests/test_scale_vnf_to_level.py
index 36eeba41..657a19ff 100644
--- a/lcm/lcm/nf/tests/test_scale_vnf_to_level.py
+++ b/lcm/lcm/nf/tests/test_scale_vnf_to_level.py
@@ -52,3 +52,21 @@ class TestNfScaleToLevel(TestCase):
data=self.req_data,
format='json')
self.failUnlessEqual(status.HTTP_409_CONFLICT, response.status_code)
+
+ def test_scale_to_level_inner_error(self):
+ NfInstModel(nfinstid='678',
+ 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/678/scale_to_level"
+ response = self.client.post(url,
+ data={},
+ format='json')
+ NfInstModel.objects.filter(nfinstid='678').delete()
+ self.failUnlessEqual(status.HTTP_500_INTERNAL_SERVER_ERROR, response.status_code)