[asterisk-dev] Change in testsuite[master]: Testsuite: Test for res_pjsip_config_wizard auto-create hints

George Joseph (Code Review) asteriskteam at digium.com
Thu Mar 26 12:00:39 CDT 2015


George Joseph has uploaded a new change for review.

  https://gerrit.asterisk.org/10

Change subject: Testsuite:  Test for res_pjsip_config_wizard auto-create hints
......................................................................

Testsuite:  Test for res_pjsip_config_wizard auto-create hints

Change-Id: I65edbb67fd2ae7008832db87365229bb2ab55eb6
---
A tests/channels/pjsip/config_wizard/hints/configs/ast1/pjsip.conf
A tests/channels/pjsip/config_wizard/hints/configs/ast1/pjsip_wizard.conf
A tests/channels/pjsip/config_wizard/hints/test-config.yaml
M tests/channels/pjsip/config_wizard/tests.yaml
4 files changed, 83 insertions(+), 0 deletions(-)


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

diff --git a/tests/channels/pjsip/config_wizard/hints/configs/ast1/pjsip.conf b/tests/channels/pjsip/config_wizard/hints/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..3ab72e2
--- /dev/null
+++ b/tests/channels/pjsip/config_wizard/hints/configs/ast1/pjsip.conf
@@ -0,0 +1,5 @@
+[ipv4]
+type=transport
+protocol=udp
+bind=0.0.0.0
+
diff --git a/tests/channels/pjsip/config_wizard/hints/configs/ast1/pjsip_wizard.conf b/tests/channels/pjsip/config_wizard/hints/configs/ast1/pjsip_wizard.conf
new file mode 100644
index 0000000..96b72d8
--- /dev/null
+++ b/tests/channels/pjsip/config_wizard/hints/configs/ast1/pjsip_wizard.conf
@@ -0,0 +1,14 @@
+[phone1]
+type = wizard
+accepts_auth = yes
+accepts_registrations = yes
+transport = ipv4
+endpoint/from_domain = test_domain
+aor/max_contacts = 7
+inbound_auth/username = testuser
+inbound_auth/password = testpass
+endpoint/direct_media = no
+hint_context = default_hints
+hint_exten = 9090
+hint_application = Dial(${HINT}/0000)
+
diff --git a/tests/channels/pjsip/config_wizard/hints/test-config.yaml b/tests/channels/pjsip/config_wizard/hints/test-config.yaml
new file mode 100644
index 0000000..7c76cba
--- /dev/null
+++ b/tests/channels/pjsip/config_wizard/hints/test-config.yaml
@@ -0,0 +1,63 @@
+testinfo:
+    summary: 'Test PJSIP Config Wizard Phone Hints'
+    description: |
+        Tests the PJSIP Config Wizard to make sure the
+        hints are properly created.
+
+properties:
+    minversion: '13.3.0'
+    dependencies:
+        - asterisk : 'res_pjsip'
+        - asterisk : 'res_pjsip_config_wizard'
+
+    tags:
+        - pjsip
+
+test-modules:
+    # allow test_runner to find and run the local test
+    add-test-to-search-path: 'True'
+    add-relative-to-search-path: ['../']
+    test-object:
+        config-section: object-config
+        typename: 'AMISendTest.AMISendTest'
+    modules:
+        -
+            config-section: 'ami-config'
+            typename: 'ami.AMIEventModule'
+
+object-config:
+    reactor-timeout: 15
+    ACTION: { "Action": "ShowDialPlan", "ActionID": "12345", "Context": "default_hints", "Extension": "9090" }
+
+ami-config:
+        -
+            type: 'headermatch'
+            conditions:
+                match:
+                    Event: 'ListDialplan'
+                    Priority: 'hint'
+            requirements:
+                match:
+                    ActionID: '12345'
+                    Context: 'default_hints'
+                    Extension: '9090'
+                    Priority: 'hint'
+                    Application: 'PJSIP/phone1'
+                    Registrar: 'res_pjsip_config_wizard'
+            count: 1
+        -
+            type: 'headermatch'
+            conditions:
+                match:
+                    Event: 'ListDialplan'
+                    Priority: '1'
+            requirements:
+                match:
+                    ActionID: '12345'
+                    Context: 'default_hints'
+                    Extension: '9090'
+                    Priority: '1'
+                    Application: 'Dial'
+                    AppData: '\${HINT}/0000'
+                    Registrar: 'res_pjsip_config_wizard'
+            count: 1
diff --git a/tests/channels/pjsip/config_wizard/tests.yaml b/tests/channels/pjsip/config_wizard/tests.yaml
index 8677e64..188afd5 100644
--- a/tests/channels/pjsip/config_wizard/tests.yaml
+++ b/tests/channels/pjsip/config_wizard/tests.yaml
@@ -1,5 +1,6 @@
 # Enter tests here in the order they should be considered for execution:
 tests:
     - test: 'phone'
+    - test: 'hints'
     - test: 'trunk'
     - test: 'registration'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I65edbb67fd2ae7008832db87365229bb2ab55eb6
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>



More information about the asterisk-dev mailing list