[asterisk-commits] apps: Add a test for the BridgeAdd application (testsuite[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Aug 19 08:56:04 CDT 2016
Anonymous Coward #1000019 has submitted this change and it was merged.
Change subject: apps: Add a test for the BridgeAdd application
......................................................................
apps: Add a test for the BridgeAdd application
Change-Id: Ib4d51eb1495d13ecf840a055bfbe918832381f1b
---
A tests/apps/bridge/bridge_add/configs/ast1/extensions.conf
A tests/apps/bridge/bridge_add/test-config.yaml
M tests/apps/bridge/tests.yaml
3 files changed, 114 insertions(+), 1 deletion(-)
Approvals:
Mark Michelson: Looks good to me, approved
Richard Mudgett: Looks good to me, but someone else must approve
Anonymous Coward #1000019: Verified
diff --git a/tests/apps/bridge/bridge_add/configs/ast1/extensions.conf b/tests/apps/bridge/bridge_add/configs/ast1/extensions.conf
new file mode 100644
index 0000000..c4cfd0f
--- /dev/null
+++ b/tests/apps/bridge/bridge_add/configs/ast1/extensions.conf
@@ -0,0 +1,26 @@
+[default]
+
+exten = alice,1,NoOp()
+ same = n,Dial(Local/bob at default)
+ same = n,Hangup()
+
+exten = bob,1,NoOp()
+ same = n,Answer()
+ same = n,AMD()
+ same = n,Playback(silence/1&goodbye&silence/1)
+ same = n,Hangup()
+
+exten = charlie,1,NoOp()
+ same = n,Answer()
+ ; We need to specify the full Local channel name since only the alice;2
+ ; channel goes into the bridge and we do not ever want to find the
+ ; alice;1 channel due to a partial match.
+ same = n,BridgeAdd(Local/alice at default-00000000;2)
+ same = n,Hangup(50)
+
+exten = charlie_real,1,NoOp()
+ same = n,Answer()
+ same = n,Playback(silence/1&hello&silence/1)
+ same = n,AMD()
+ same = n,Hangup()
+
diff --git a/tests/apps/bridge/bridge_add/test-config.yaml b/tests/apps/bridge/bridge_add/test-config.yaml
new file mode 100644
index 0000000..491be48
--- /dev/null
+++ b/tests/apps/bridge/bridge_add/test-config.yaml
@@ -0,0 +1,87 @@
+testinfo:
+ summary: 'Tests BridgeAdd application'
+ description: |
+ * We call alice
+ * alice calls bob
+ * bob answers and starts the AMD app
+ * When bob enters the bridge, we call charlie
+ * when charlie answers, bridgeadd is is called
+ * bridgeadd calls BridgeAdd to alice's channel
+ * charlie plays a human simulation
+ * bob's AMD detects HUMAN
+ * charlie's playback finishes and now he starts AMD
+ * bob's AMD finishes and now he plays a human simulation
+ * charlie's AMD detects HUMAN
+
+test-modules:
+ test-object:
+ config-section: test-object-config
+ typename: 'test_case.TestCaseModule'
+ modules:
+ -
+ config-section: 'ami-config'
+ typename: 'pluggable_modules.EventActionModule'
+
+test-object-config:
+ reactor-timeout: 15
+ connect-ami: True
+ stop-on-end: True
+
+ami-config:
+ -
+ ami-start:
+ ami-actions:
+ action:
+ Action: 'Originate'
+ ActionID: '12345'
+ Channel: 'Local/alice at default'
+ Exten: 'bob'
+ Context: 'default'
+ Priority: '1'
+ Codecs: 'gsm,ulaw'
+ -
+ ami-events:
+ conditions:
+ match:
+ Event: 'BridgeEnter'
+ BridgeTechnology: 'simple_bridge'
+ Channel: 'Local/alice at default-00000000;2'
+ count: 1
+ ami-actions:
+ action:
+ Action: 'Originate'
+ ActionID: '12345'
+ Channel: 'Local/charlie at default'
+ Exten: 'charlie_real'
+ Context: 'default'
+ Priority: '1'
+ Codecs: 'gsm,ulaw'
+ -
+ ami-events:
+ -
+ conditions:
+ match:
+ Event: 'VarSet'
+ Variable: 'AMDSTATUS'
+ Value: 'HUMAN'
+ Channel: 'Local/bob at default-00000001;2'
+ count: 1
+ -
+ conditions:
+ match:
+ Event: 'VarSet'
+ Variable: 'AMDSTATUS'
+ Value: 'HUMAN'
+ Channel: 'Local/charlie at default-00000002;1'
+ count: 1
+ stop_test:
+
+properties:
+ minversion: '14.0.0'
+ dependencies:
+ - asterisk : 'app_amd'
+ - asterisk : 'app_bridgeaddchan'
+ - asterisk : 'app_dial'
+ - asterisk : 'app_playback'
+ tags:
+ - bridge
diff --git a/tests/apps/bridge/tests.yaml b/tests/apps/bridge/tests.yaml
index dda93f1..8f09e83 100644
--- a/tests/apps/bridge/tests.yaml
+++ b/tests/apps/bridge/tests.yaml
@@ -3,4 +3,4 @@
- test: 'bridge_baseline'
- test: 'bridge_transfer_callee'
- dir: 'bridge_wait'
-
+ - test: 'bridge_add'
--
To view, visit https://gerrit.asterisk.org/3569
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib4d51eb1495d13ecf840a055bfbe918832381f1b
Gerrit-PatchSet: 4
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
More information about the asterisk-commits
mailing list