ONOS-2001 Test Case 15 now aborts using main.skipCase() when elections app isn't loaded on a node

Change-Id: I72511c20c1288afbb2aa4ed17c2c3f8c1bf8c8c4
diff --git a/TestON/tests/HAclusterRestart/HAclusterRestart.py b/TestON/tests/HAclusterRestart/HAclusterRestart.py
index d1f4133..b5ebe7d 100644
--- a/TestON/tests/HAclusterRestart/HAclusterRestart.py
+++ b/TestON/tests/HAclusterRestart/HAclusterRestart.py
@@ -2862,6 +2862,11 @@
             onpass="All nodes successfully ran for leadership",
             onfail="At least one node failed to run for leadership" )
 
+        if electionResult == main.FALSE:
+            main.log.error(
+                "Skipping Test Case because Election Test App isn't loaded" )
+            main.skipCase()
+
         main.step( "Check that each node shows the same leader and candidates" )
         sameResult = main.TRUE
         failMessage = "Nodes have different leaders"
diff --git a/TestON/tests/HAminorityRestart/HAminorityRestart.py b/TestON/tests/HAminorityRestart/HAminorityRestart.py
index c16fbb7..855f380 100644
--- a/TestON/tests/HAminorityRestart/HAminorityRestart.py
+++ b/TestON/tests/HAminorityRestart/HAminorityRestart.py
@@ -2808,6 +2808,11 @@
             onpass="All nodes successfully ran for leadership",
             onfail="At least one node failed to run for leadership" )
 
+        if electionResult == main.FALSE:
+            main.log.error(
+                "Skipping Test Case because Election Test App isn't loaded" )
+            main.skipCase()
+
         main.step( "Check that each node shows the same leader and candidates" )
         sameResult = main.TRUE
         failMessage = "Nodes have different leaders"
diff --git a/TestON/tests/HAsanity/HAsanity.py b/TestON/tests/HAsanity/HAsanity.py
index 72381ae..6ceaead 100644
--- a/TestON/tests/HAsanity/HAsanity.py
+++ b/TestON/tests/HAsanity/HAsanity.py
@@ -2739,7 +2739,7 @@
         assert main.CLIs, "main.CLIs not defined"
         assert main.nodes, "main.nodes not defined"
 
-        description = "Check that Leadership Election is still functional"
+        description = "Check that Leadership Election App is still functional"
         main.case( description )
         # NOTE: Need to re-run since being a canidate is not persistant
         # TODO: add check for "Command not found:" in the driver, this
@@ -2771,6 +2771,11 @@
             onpass="All nodes successfully ran for leadership",
             onfail="At least one node failed to run for leadership" )
 
+        if electionResult == main.FALSE:
+            main.log.error(
+                "Skipping Test Case because Election Test isn't loaded" )
+            main.skipCase()
+
         main.step( "Check that each node shows the same leader and candidates" )
         sameResult = main.TRUE
         failMessage = "Nodes have different leaders"
diff --git a/TestON/tests/HAsingleInstanceRestart/HAsingleInstanceRestart.py b/TestON/tests/HAsingleInstanceRestart/HAsingleInstanceRestart.py
index b5fa9dc..8a86647 100644
--- a/TestON/tests/HAsingleInstanceRestart/HAsingleInstanceRestart.py
+++ b/TestON/tests/HAsingleInstanceRestart/HAsingleInstanceRestart.py
@@ -1929,6 +1929,11 @@
             onpass="All nodes successfully ran for leadership",
             onfail="At least one node failed to run for leadership" )
 
+        if electionResult == main.FALSE:
+            main.log.error(
+                "Skipping Test Case because Election Test App isn't loaded" )
+            main.skipCase()
+
         main.step( "Check that each node shows the same leader and candidates" )
         sameResult = main.TRUE
         failMessage = "Nodes have different leaders"