summaryrefslogtreecommitdiffstats
path: root/lcm
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2017-02-15 11:54:35 +0800
committerying.yunlong <ying.yunlong@zte.com.cn>2017-02-15 11:54:35 +0800
commit12af60d015b56b12768797e5729c43590366151d (patch)
tree66067082ff14b8dab4c6a325b9c10092152204c6 /lcm
parente01678f8fed4b6d9e843abadad0b36bf03057455 (diff)
Modify testcase of terminate VNF instance
Change-Id: I66299a08f4350c420c8737c2e83f653513dbf1fd Issue-Id: GVNFM-17 Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
Diffstat (limited to 'lcm')
-rw-r--r--lcm/lcm/nf/vnfs/tests/test_vnf_cancel.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/lcm/lcm/nf/vnfs/tests/test_vnf_cancel.py b/lcm/lcm/nf/vnfs/tests/test_vnf_cancel.py
index 252d8790..c4023c81 100644
--- a/lcm/lcm/nf/vnfs/tests/test_vnf_cancel.py
+++ b/lcm/lcm/nf/vnfs/tests/test_vnf_cancel.py
@@ -78,3 +78,18 @@ class TestNFTerminate(TestCase):
JobUtil.add_job_status(self.job_id, 0, "INST_VNF_READY")
TermVnf(data, nf_inst_id=self.nf_inst_id, job_id=self.job_id).run()
self.assert_job_result(self.job_id, 255, "VnfInst(%s) does not exist" % self.nf_inst_id)
+
+ def test_terminate_vnf_success(self):
+ NfInstModel.objects.create(nfinstid='1111', mnfinstid='1111', nf_name='2222',
+ package_id='todo', vnfm_inst_id='todo', version='', vendor='',
+ producttype='', netype='', vnfd_model='',
+ instantiationState='VNF_INSTANTIATED', nf_desc='', vnfdid='',
+ vnfSoftwareVersion='', vnfConfigurableProperties='todo',
+ localizationLanguage='EN_US', create_time=now_time())
+ data = {"terminationType": "FORCEFUL",
+ "gracefulTerminationTimeout": 120}
+ self.nf_inst_id = '1111'
+ self.job_id = JobUtil.create_job('NF', 'CREATE', self.nf_inst_id)
+ JobUtil.add_job_status(self.job_id, 0, "INST_VNF_READY")
+ TermVnf(data, nf_inst_id=self.nf_inst_id, job_id=self.job_id).run()
+ self.assert_job_result(self.job_id, 100, "Terminate Vnf success.")