[asterisk-commits] page predial: Adjust expected bridge channel count. (testsuite[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Aug 24 08:13:00 CDT 2016


Joshua Colp has submitted this change and it was merged.

Change subject: page_predial: Adjust expected bridge channel count.
......................................................................


page_predial: Adjust expected bridge channel count.

A recent change to app_confbridge made it so that the announcer channel
is permanently in the bridge. This results in the bridge reporting a
different number of channels than before. This was causing the
page_predial test to fail.

The fix is to account for the change in reported channels when testing.

Change-Id: I220400b2b81d56fb35c144cceb37d6f0f15aa5d9
---
M tests/apps/page/page_predial/test-config.yaml
1 file changed, 160 insertions(+), 2 deletions(-)

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/tests/apps/page/page_predial/test-config.yaml b/tests/apps/page/page_predial/test-config.yaml
index 7d09231..d44df76 100644
--- a/tests/apps/page/page_predial/test-config.yaml
+++ b/tests/apps/page/page_predial/test-config.yaml
@@ -13,8 +13,18 @@
 
 test-modules:
     test-object:
-        config-section: test-object-config
-        typename: 'apptest.AppTest'
+        -
+            config-section: test-object-config
+            typename: 'apptest.AppTest'
+            maxversion: '13.12.0'
+        -
+            # Starting in 13.12.0, ConfBridges have announcer channels
+            # permanently in them. The result is that the number of channels
+            # the bridge reports is now one higher for these tests.
+            config-section: test-object-config-13-12
+            typename: 'apptest.AppTest'
+            minversion: '13.12.0'
+
 
 test-object-config:
   app: 'Page'
@@ -163,6 +173,154 @@
                   action-type: 'set-expected-result'
                   expected-result: 'Phase 3 - All channels entered bridge. Hang up on bridge'
 
+
+test-object-config-13-12:
+  app: 'Page'
+  scenarios:
+    # Phase 0: Baseline
+    -
+      channels:
+        -
+          channel-id: 'baseline'
+          channel-name: 'Local/standard at page'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: True
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'BridgeEnter'
+                  BridgeNumChannels: '3'
+                  ChannelStateDesc: 'Up'
+              actions:
+                -
+                  action-type: 'hangup'
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Phase 0 - All channels entered bridge. Hang up on bridge'
+
+    #Phase 1: Predial Caller
+    -
+      channels:
+        -
+          channel-id: 'pd-caller'
+          channel-name: 'Local/predial_caller at page'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: True
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'UserEvent'
+                  UserEvent: 'UserPredial'
+                  Channel: 'Local/predial_caller at page-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Phase 1 - Received Predial Event for Caller Channel.'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'BridgeEnter'
+                  BridgeNumChannels: '3'
+                  ChannelStateDesc: 'Up'
+              actions:
+                -
+                  action-type: 'hangup'
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Phase 1 - All channels entered bridge. Hang up on bridge'
+
+    #Phase 2: Predial Callee (single channel)
+    -
+      events:
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'UserEvent'
+              UserEvent: 'UserPredial'
+              Channel: 'Local/test_pagee1 at test-.*'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Phase 2 - Received Predial Event for Callee Channel.'
+
+      channels:
+        -
+          channel-id: 'pd-callee'
+          channel-name: 'Local/predial_callee at page'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: True
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'BridgeEnter'
+                  BridgeNumChannels: '3'
+                  ChannelStateDesc: 'Up'
+              actions:
+                -
+                  action-type: 'hangup'
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Phase 2 - All channels entered bridge. Hang up on bridge'
+
+    #Phase 3: Predial Callee (multiple channels)
+    -
+      events:
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'UserEvent'
+              UserEvent: 'UserPredial'
+              Channel: 'Local/test_pagee1 at test-.*'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Phase 3 - Received Predial Event for Callee Channel (1 of 2).'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'UserEvent'
+              UserEvent: 'UserPredial'
+              Channel: 'Local/test_pagee2 at test-.*'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Phase 3 - Received Predial Event for Callee Channel (2 of 2).'
+
+      channels:
+        -
+          channel-id: 'pd-callee-mult'
+          channel-name: 'Local/predial_callee_multiple at page'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: True
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'BridgeEnter'
+                  BridgeNumChannels: '4'
+                  ChannelStateDesc: 'Up'
+              actions:
+                -
+                  action-type: 'hangup'
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Phase 3 - All channels entered bridge. Hang up on bridge'
+
 properties:
     minversion: '13.0.0'
     tags:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I220400b2b81d56fb35c144cceb37d6f0f15aa5d9
Gerrit-PatchSet: 2
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-commits mailing list