From: fengyuanxing Date: Mon, 12 Mar 2018 03:01:39 +0000 (+0800) Subject: Add a new test case with incorrect scale nsdid X-Git-Tag: v1.1.0~61 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F83%2F35083%2F1;p=vfc%2Fnfvo%2Flcm.git Add a new test case with incorrect scale nsdid Change-Id: Ic949c4db2bc93f70b98340287d514eb1841c2cf6 Issue-ID: VFC-784 Signed-off-by: fengyuanxing --- diff --git a/lcm/ns/tests/test_ns_manual_scale.py b/lcm/ns/tests/test_ns_manual_scale.py index c977ff66..4bec734c 100644 --- a/lcm/ns/tests/test_ns_manual_scale.py +++ b/lcm/ns/tests/test_ns_manual_scale.py @@ -153,6 +153,21 @@ class TestNsManualScale(TestCase): jobs = JobModel.objects.filter(jobid=self.job_id) self.assertEqual(255, jobs[0].progress) + def test_ns_manual_scale_error_nsd_id(self): + data = { + "scaleType": "SCALE_ERR", + "scaleNsData": [{ + "scaleNsByStepsData": [{ + "aspectId": "sss_zte", + "numberOfSteps": 1, + "scalingDirection": "0" + }] + }] + } + NSManualScaleService(self.ns_inst_id, data, self.job_id).run() + jobs = JobModel.objects.filter(jobid=self.job_id) + self.assertEqual(255, jobs[0].progress) + @mock.patch.object(restcall, 'call_req') def test_ns_manual_scale_thread(self, mock_call): data = {