Modify Xtesting script based on the fix in NFV-TST

This patch modifies Xtesting script to remove commenting out steps
which call a test case in ETSI NFV-TST.
The test case was defective but now is fixed in the below [1] by
ETSI NFV-TST.

[1] https://forge.etsi.org/rep/nfv/api-tests/-/issues/196

Issue-ID: SMO-119
Change-Id: Ieda9b37ae3072f61e32cb269abcb96ba184eaf51
Signed-off-by: Koichi Edagawa <edagawa.kc@nec.com>
diff --git a/tacker/tacker/tests/xtesting/api-tests/SOL005/CNFPrecondition/packageTest.sh b/tacker/tacker/tests/xtesting/api-tests/SOL005/CNFPrecondition/packageTest.sh
index f0eeb2d..c58be28 100755
--- a/tacker/tacker/tests/xtesting/api-tests/SOL005/CNFPrecondition/packageTest.sh
+++ b/tacker/tacker/tests/xtesting/api-tests/SOL005/CNFPrecondition/packageTest.sh
@@ -63,9 +63,22 @@
 echo "\${VNFM_SCHEMA}    http" >> $variableFile
 
 #comment out test cases in api-tests
-# TODO: After the bug in the test case "Check Individual VNF LCM operation occurrence operationState is"
-#       is fixed by ESTI NFV TST, we need to remove the step for commenting it out below.
-sed -i 's/    Check Individual VNF LCM operation occurrence operationState is    STARTING/\#   Check Individual VNF LCM operation occurrence operationState is    STARTING\n\n\*\*\* comment \*\*\*/g' ../../SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot
-sed -i 's/    Check Individual VNF LCM operation occurrence operationState is    STARTING/\#   Check Individual VNF LCM operation occurrence operationState is    STARTING\n\n\*\*\* comment \*\*\*/g' ../../SOL003/VNFLifecycleManagement-API/HealVNFTask.robot
+# TODO: Although the bug in the test case "Check Individual VNF LCM operation occurrence operationState is"
+#       was fixed by ESTI NFV TST, we have observed that healing conformance test fails due to this test case.
+#       After this issue is resolved, we need to remove the step for commenting it out below.
+sed -i 's/    Check Individual VNF LCM operation occurrence operationState is    STARTING/\#   Check Individual VNF LCM operation occurrence operationState is    STARTING/g' ../../SOL003/VNFLifecycleManagement-API/HealVNFTask.robot
+
+#comment out test cases in api-tests which are unnecessary for conformance test
+robotFile=../../SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot
+lineNo=`cat -n $robotFile | sed -n '/Instantiate a vnfInstance/,$p' | grep -E '^([0-9]|[[:space:]])+$' | head -1`
+insertSteps="*** comment ***"
+Command="sed -i '$((lineNo))a $insertSteps' $robotFile"
+eval "$Command"
+
+robotFile=../../SOL003/VNFLifecycleManagement-API/HealVNFTask.robot
+lineNo=`cat -n $robotFile | sed -n '/POST Heal a vnfInstance/,$p' | grep -E '^([0-9]|[[:space:]])+$' | head -1`
+insertSteps="*** comment ***"
+Command="sed -i '$((lineNo))a $insertSteps' $robotFile"
+eval "$Command"
 
 exit 0