From c1595407860cc29bfc9086ebd73874643ce10333 Mon Sep 17 00:00:00 2001 From: Mikkel Hagen Date: Mon, 19 Mar 2018 11:56:12 -0500 Subject: [PATCH] Implement fast failure on failure to delete VCH --- tests/resources/VCH-Util.robot | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/resources/VCH-Util.robot b/tests/resources/VCH-Util.robot index a991488ac0..5024e4d001 100644 --- a/tests/resources/VCH-Util.robot +++ b/tests/resources/VCH-Util.robot @@ -345,7 +345,8 @@ Run Secret VIC Machine Inspect Command Run VIC Machine Delete Command ${rc} ${output}= Run Secret VIC Machine Delete Command %{VCH-NAME} Log ${output} - Wait Until Keyword Succeeds 6x 5s Check Delete Success %{VCH-NAME} + ${status}= Run Keyword And Return Status Wait Until Keyword Succeeds 6x 5s Check Delete Success %{VCH-NAME} + Assert ${status} vic-machine delete failed to remove %{VCH-NAME} Should Be Equal As Integers ${rc} 0 Should Contain ${output} Completed successfully ${output}= Run rm -rf %{VCH-NAME} @@ -700,3 +701,8 @@ Enable VCH SSH Log ${output} Should Be Equal As Integers ${rc} 0 Should Contain ${output} Completed successfully + +Assert + [Arguments] ${status} ${msg} + ${envExists}= Run Keyword And Return Status Environment Variable Should Be Set FAST_FAILURE + Run Keyword If ${envExists} Run Keyword If %{FAST_FAILURE} Run Keyword Unless ${status} Fatal Error ${msg}