[Asterisk-code-review] pbx/dialplan reload: Add hints to the dialplan reload test (testsuite[master])

Matt Jordan asteriskteam at digium.com
Thu Apr 30 11:02:32 CDT 2015


Matt Jordan has uploaded a new change for review.

  https://gerrit.asterisk.org/310

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(-)


  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/10/310/2

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: newchange
Gerrit-Change-Id: Ic8f369aa552cad8e53b790596b1eafc0b5ea1b16
Gerrit-PatchSet: 2
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>



More information about the asterisk-code-review mailing list