HC Test: remove log check from HC startup 72/8672/4
authorselias <samelias@cisco.com>
Thu, 5 Oct 2017 10:19:55 +0000 (12:19 +0200)
committerselias <samelias@cisco.com>
Thu, 5 Oct 2017 14:41:04 +0000 (16:41 +0200)
 - remove log check from "Check Honeycomb Startup State" keyword
 - fix workaround for ODL startup issue
 - change log level for HttpRequestError so it doesn't clutter
log.html output
 - update EXPECTED_FAILING tags for plugin-acl and routing suites

Change-Id: I7380d24801a6535bdf77505edada39ea2412e833
Signed-off-by: selias <samelias@cisco.com>
resources/libraries/python/HTTPRequest.py
resources/libraries/python/honeycomb/HoneycombSetup.py
resources/libraries/robot/honeycomb/honeycomb.robot
tests/vpp/func/honeycomb/mgmt-cfg-pluginacl-apihc-apivat-func.robot
tests/vpp/func/honeycomb/mgmt-cfg-routing-apihc-apivat-func.robot

index 869078b..c4e73c2 100644 (file)
@@ -73,7 +73,7 @@ class HTTPRequestError(Exception):
         self._msg = "{0}: {1}".format(self.__class__.__name__, msg)
         self._details = details
         if enable_logging:
         self._msg = "{0}: {1}".format(self.__class__.__name__, msg)
         self._details = details
         if enable_logging:
-            logger.error(self._msg)
+            logger.info(self._msg)
             logger.debug(self._details)
 
     def __repr__(self):
             logger.debug(self._details)
 
     def __repr__(self):
index b5e964d..975a36c 100644 (file)
@@ -155,33 +155,22 @@ class HoneycombSetup(object):
 
         ssh = SSH()
         ssh.connect(node)
 
         ssh = SSH()
         ssh.connect(node)
-        ret_code, pid, _ = ssh.exec_command("pgrep honeycomb")
-        if ret_code != 0:
-            raise HoneycombError("No process named 'honeycomb' found.")
 
 
-        pid = int(pid)
         count = 0
         start = time()
         while time() - start < timeout and count < retries:
             count += 1
         count = 0
         start = time()
         while time() - start < timeout and count < retries:
             count += 1
-            ret_code, _, _ = ssh.exec_command(
-                " | ".join([
-                    "sudo tail -n 1000 /var/log/syslog",
-                    "grep {pid}".format(pid=pid),
-                    "grep 'Honeycomb started successfully!'"])
-            )
-            if ret_code != 0:
-                logger.debug(
-                    "Attempt #{count} failed on log check.".format(
-                        count=count))
+
+            try:
+                status_code_version, _ = HcUtil.get_honeycomb_data(
+                    node, "oper_vpp_version")
+                status_code_if_cfg, _ = HcUtil.get_honeycomb_data(
+                    node, "config_vpp_interfaces")
+                status_code_if_oper, _ = HcUtil.get_honeycomb_data(
+                    node, "oper_vpp_interfaces")
+            except HTTPRequestError:
                 sleep(interval)
                 continue
                 sleep(interval)
                 continue
-            status_code_version, _ = HcUtil.get_honeycomb_data(
-                node, "oper_vpp_version")
-            status_code_if_cfg, _ = HcUtil.get_honeycomb_data(
-                node, "config_vpp_interfaces")
-            status_code_if_oper, _ = HcUtil.get_honeycomb_data(
-                node, "oper_vpp_interfaces")
             if status_code_if_cfg == HTTPCodes.OK\
                     and status_code_if_cfg == HTTPCodes.OK\
                     and status_code_if_oper == HTTPCodes.OK:
             if status_code_if_cfg == HTTPCodes.OK\
                     and status_code_if_cfg == HTTPCodes.OK\
                     and status_code_if_oper == HTTPCodes.OK:
@@ -200,16 +189,10 @@ class HoneycombSetup(object):
                 sleep(interval)
                 continue
         else:
                 sleep(interval)
                 continue
         else:
-            _, vpp_status, _ = ssh.exec_command("service vpp status")
-            ret_code, hc_log, _ = ssh.exec_command(
-                " | ".join([
-                    "sudo tail -n 1000 /var/log/syslog",
-                    "grep {pid}".format(pid=pid)]))
+            _, vpp_status, _ = ssh.exec_command("sudo service vpp status")
             raise HoneycombError(
                 "Timeout or max retries exceeded. Status of VPP:\n"
             raise HoneycombError(
                 "Timeout or max retries exceeded. Status of VPP:\n"
-                "{vpp_status}\n"
-                "Syslog entries filtered by Honeycomb's pid:\n"
-                "{hc_log}".format(vpp_status=vpp_status, hc_log=hc_log))
+                "{vpp_status}".format(vpp_status=vpp_status))
 
     @staticmethod
     def check_honeycomb_shutdown_state(node):
 
     @staticmethod
     def check_honeycomb_shutdown_state(node):
@@ -677,8 +660,7 @@ class HoneycombStartupConfig(object):
     def __init__(self):
         """Initializer."""
 
     def __init__(self):
         """Initializer."""
 
-        self.template = """
-        #!/bin/sh -
+        self.template = """#!/bin/sh -
         STATUS=100
 
         while [ $STATUS -eq 100 ]
         STATUS=100
 
         while [ $STATUS -eq 100 ]
index a2be0c7..fa5cea7 100644 (file)
 | | Configure Log Level | ${node} | TRACE
 | | Configure Persistence | ${node} | disable
 | | Configure jVPP timeout | ${node} | ${10}
 | | Configure Log Level | ${node} | TRACE
 | | Configure Persistence | ${node} | disable
 | | Configure jVPP timeout | ${node} | ${10}
+| | Generate Honeycomb startup configuration for ODL test | ${node}
 | | Clear Persisted Honeycomb Configuration | ${node}
 | | Configure Honeycomb service on DUTs | ${node}
 
 | | Clear Persisted Honeycomb Configuration | ${node}
 | | Configure Honeycomb service on DUTs | ${node}
 
index a08aecc..2126f91 100644 (file)
@@ -51,8 +51,7 @@
 | ...
 | Documentation | *Honeycomb access control lists test suite for ACL plugin.*
 | ...
 | ...
 | Documentation | *Honeycomb access control lists test suite for ACL plugin.*
 | ...
-# Failing due to HC2VPP-173: cannot clean up ACLs in test teardown
-| Force Tags | HC_FUNC | EXPECTED_FAILING
+| Force Tags | HC_FUNC
 
 *** Test Cases ***
 | TC01: ACL MAC filtering through plugin-acl node - bridged
 
 *** Test Cases ***
 | TC01: ACL MAC filtering through plugin-acl node - bridged
index 404ba88..1c96d76 100644 (file)
 | | ... | destination. Make sure no packet is received on the second TG\
 | | ... | interface.
 | | ...
 | | ... | destination. Make sure no packet is received on the second TG\
 | | ... | interface.
 | | ...
+# VPP-930: ip6_fib_dump shows incorrect outgoing interface index
+| | [Tags] | EXPECTED_FAILING
 | | ${table}= | Set Variable | table6
 | | Given Setup interfaces and neighbors for IPv6 routing test
 | | When Honeycomb configures routing table
 | | ${table}= | Set Variable | table6
 | | Given Setup interfaces and neighbors for IPv6 routing test
 | | When Honeycomb configures routing table