[asterisk-commits] pbx/dialplan reload: Add hints to the dialplan reload test (testsuite[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat May 2 10:17:08 CDT 2015


Matt Jordan has submitted this change and it was merged.

Change subject: pbx/dialplan_reload: Add hints to the dialplan reload test
......................................................................


pbx/dialplan_reload: Add hints to the dialplan reload test

This patch adds a minimal number of hints to the dialplan reload test to
verify that during a dialplan reload, the hints are successfully
reloaded/merged as well. Two hints have been added: a static hint and a
dynamic hint using a dialplan variable.

ASTERISK-25040

Change-Id: Ic8f369aa552cad8e53b790596b1eafc0b5ea1b16
---
M tests/pbx/dialplan_reload/configs/ast1/extensions.conf
M tests/pbx/dialplan_reload/run-test
2 files changed, 11 insertions(+), 3 deletions(-)

Approvals:
  Mark Michelson: Looks good to me, but someone else must approve
  Matt Jordan: Looks good to me, approved; Verified



diff --git a/tests/pbx/dialplan_reload/configs/ast1/extensions.conf b/tests/pbx/dialplan_reload/configs/ast1/extensions.conf
index 548a02c..27aab09 100644
--- a/tests/pbx/dialplan_reload/configs/ast1/extensions.conf
+++ b/tests/pbx/dialplan_reload/configs/ast1/extensions.conf
@@ -1,3 +1,6 @@
 [incoming_1]
+
+exten => _60.,hint,Local/${EXTEN}@incoming_1
+exten => 60,hint,Local/60 at incoming_1
 exten =>  60./,1,NoOp()
 exten =>  60.,1,NoOp()
diff --git a/tests/pbx/dialplan_reload/run-test b/tests/pbx/dialplan_reload/run-test
index da1f097..59f8d6d 100755
--- a/tests/pbx/dialplan_reload/run-test
+++ b/tests/pbx/dialplan_reload/run-test
@@ -33,9 +33,14 @@
 
         def callback(defer):
             LOGGER.info("DIALPLAN SHOW = %s" % defer.output)
-            print defer.output.strip()
-            if defer.output.find("CID match ''") == -1:
-                print "Dialplan did not load correctly"
+            if "CID match ''" not in defer.output:
+                LOGGER.error("Dialplan did not load correctly")
+                self.failure()
+            elif "hint: Local/60 at incoming_1" not in defer.output:
+                LOGGER.error("Dialplan failed to load static hint")
+                self.failure()
+            elif "hint: Local/${EXTEN}@incoming_1" not in defer.output:
+                LOGGER.error("Dialplan failed to load dynamic hint")
                 self.failure()
             else:
                 self.reload()

-- 
To view, visit https://gerrit.asterisk.org/310
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic8f369aa552cad8e53b790596b1eafc0b5ea1b16
Gerrit-PatchSet: 2
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Ashley Sanders <asanders at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>



More information about the asterisk-commits mailing list