FIX: Vhost teardown 17/21117/9
authorPeter Mikus <pmikus@cisco.com>
Wed, 7 Aug 2019 14:47:34 +0000 (14:47 +0000)
committerPeter Mikus <pmikus@cisco.com>
Wed, 14 Aug 2019 10:15:07 +0000 (10:15 +0000)
If test failed before vnf_manager is created then teardown
does fail as well due to missing variable.

Signed-off-by: Peter Mikus <pmikus@cisco.com>
Change-Id: I0b23648bce78738cf4c377979d7a06fb488d990d

resources/libraries/robot/shared/test_teardown.robot

index cad3c62..e130038 100644 (file)
@@ -65,7 +65,9 @@
 | | ... | Additional teardown for tests which uses vhost(s) and VM(s).
 | | ...
 | | Show VPP vhost on all DUTs | ${nodes}
-| | vnf_manager.Kill All VMs
+| | ${vnf_status} | ${value}= | Run Keyword And Ignore Error
+| | ... | Keyword Should Exist | vnf_manager.Kill All VMs
+| | Run Keyword If | '${vnf_status}' == 'PASS' | vnf_manager.Kill All VMs
 
 | Additional Test Tear Down Action For nat
 | | [Documentation]

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.