<p>N A has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/testsuite/+/15982">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_confbridge: Test for ConfKick application<br><br>This tests the new ConfKick application to<br>ensure that it correctly manipulates<br>the bridge with different parameters.<br><br>ASTERISK-29446<br><br>Change-Id: Ia85d6190ab3cf88a7cc4b3071a38dee191bc8898<br>---<br>A tests/apps/confbridge/confbridge_confkick/configs/ast1/confbridge.conf<br>A tests/apps/confbridge/confbridge_confkick/configs/ast1/extensions.conf<br>A tests/apps/confbridge/confbridge_confkick/test-config.yaml<br>M tests/apps/confbridge/tests.yaml<br>4 files changed, 134 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/82/15982/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/apps/confbridge/confbridge_confkick/configs/ast1/confbridge.conf b/tests/apps/confbridge/confbridge_confkick/configs/ast1/confbridge.conf</span><br><span>new file mode 100644</span><br><span>index 0000000..21ce153</span><br><span>--- /dev/null</span><br><span>+++ b/tests/apps/confbridge/confbridge_confkick/configs/ast1/confbridge.conf</span><br><span>@@ -0,0 +1,6 @@</span><br><span style="color: hsl(120, 100%, 40%);">+[default_user]</span><br><span style="color: hsl(120, 100%, 40%);">+type=user</span><br><span style="color: hsl(120, 100%, 40%);">+quiet=yes</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[default_bridge]</span><br><span style="color: hsl(120, 100%, 40%);">+type=bridge</span><br><span>diff --git a/tests/apps/confbridge/confbridge_confkick/configs/ast1/extensions.conf b/tests/apps/confbridge/confbridge_confkick/configs/ast1/extensions.conf</span><br><span>new file mode 100644</span><br><span>index 0000000..09d86f1</span><br><span>--- /dev/null</span><br><span>+++ b/tests/apps/confbridge/confbridge_confkick/configs/ast1/extensions.conf</span><br><span>@@ -0,0 +1,31 @@</span><br><span style="color: hsl(120, 100%, 40%);">+[default]</span><br><span style="color: hsl(120, 100%, 40%);">+exten => user1,1,Answer()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,ConfBridge(test123)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,GotoIf($["${CONFBRIDGE_RESULT}"="KICKED"]?pass,1:fail,1)</span><br><span style="color: hsl(120, 100%, 40%);">+exten => user2,1,Answer()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Set(GLOBAL(test123user)=${CHANNEL})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,ConfBridge(test123)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,GotoIf($["${CONFBRIDGE_RESULT}"="KICKED"]?pass,1:fail,1)</span><br><span style="color: hsl(120, 100%, 40%);">+exten => user3,1,Answer()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,ConfBridge(test123)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,GotoIf($["${CONFBRIDGE_RESULT}"="KICKED"]?pass,1:fail,1)</span><br><span style="color: hsl(120, 100%, 40%);">+exten => admin,1,Answer()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Set(CONFBRIDGE(user,admin)=yes)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,ConfBridge(test123)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,GotoIf($["${CONFBRIDGE_RESULT}"="KICKED"]?pass,1:fail,1)</span><br><span style="color: hsl(120, 100%, 40%);">+exten => kicker,1,Answer(1)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,ExecIf($[${CONFBRIDGE_INFO(parties,test123)}=4]?UserEvent(ConfKickSuccess,Result: Pass):UserEvent(ConfKickSuccess,Result: Fail,Reason: ${CONFBRIDGE_INFO(parties,test123)}))</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,ConfKick(test123,${test123user})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Wait(0.1)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,ExecIf($[${CONFBRIDGE_INFO(parties,test123)}=3]?UserEvent(ConfKickSuccess,Result: Pass):UserEvent(ConfKickSuccess,Result: Fail,Reason: ${CONFBRIDGE_INFO(parties,test123)}))</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,ConfKick(test123,participants)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Wait(0.1)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,ExecIf($[${CONFBRIDGE_INFO(parties,test123)}=1]?UserEvent(ConfKickSuccess,Result: Pass):UserEvent(ConfKickSuccess,Result: Fail,Reason: ${CONFBRIDGE_INFO(parties,test123)}))</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,ConfKick(test123,all)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Wait(0.1)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,ExecIf($[${CONFBRIDGE_INFO(parties,test123)}=0]?UserEvent(ConfKickSuccess,Result: Pass):UserEvent(ConfKickSuccess,Result: Fail,Reason: ${CONFBRIDGE_INFO(parties,test123)}))</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Hangup()</span><br><span style="color: hsl(120, 100%, 40%);">+exten => fail,1,UserEvent(ConfBridgeKick,Result: Fail,Reason: ${CONFBRIDGE_RESULT})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Hangup()</span><br><span style="color: hsl(120, 100%, 40%);">+exten => pass,1,UserEvent(ConfBridgeKick,Result: Pass)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Hangup()</span><br><span>diff --git a/tests/apps/confbridge/confbridge_confkick/test-config.yaml b/tests/apps/confbridge/confbridge_confkick/test-config.yaml</span><br><span>new file mode 100644</span><br><span>index 0000000..297233e</span><br><span>--- /dev/null</span><br><span>+++ b/tests/apps/confbridge/confbridge_confkick/test-config.yaml</span><br><span>@@ -0,0 +1,96 @@</span><br><span style="color: hsl(120, 100%, 40%);">+testinfo:</span><br><span style="color: hsl(120, 100%, 40%);">+ summary: 'Ensure that ConfKick application works as expected'</span><br><span style="color: hsl(120, 100%, 40%);">+ description: |</span><br><span style="color: hsl(120, 100%, 40%);">+ 'This test ensures that ConfKick functions as expected by</span><br><span style="color: hsl(120, 100%, 40%);">+ testing that specific, non-admin, and all participants can</span><br><span style="color: hsl(120, 100%, 40%);">+ be successfully kicked from the bridge.'</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+test-modules:</span><br><span style="color: hsl(120, 100%, 40%);">+ test-object:</span><br><span style="color: hsl(120, 100%, 40%);">+ config-section: test-object-config</span><br><span style="color: hsl(120, 100%, 40%);">+ typename: 'test_case.TestCaseModule'</span><br><span style="color: hsl(120, 100%, 40%);">+ modules:</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ config-section: user1-originator</span><br><span style="color: hsl(120, 100%, 40%);">+ typename: 'pluggable_modules.Originator'</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ config-section: user2-originator</span><br><span style="color: hsl(120, 100%, 40%);">+ typename: 'pluggable_modules.Originator'</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ config-section: user3-originator</span><br><span style="color: hsl(120, 100%, 40%);">+ typename: 'pluggable_modules.Originator'</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ config-section: admin-originator</span><br><span style="color: hsl(120, 100%, 40%);">+ typename: 'pluggable_modules.Originator'</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ config-section: kicker-originator</span><br><span style="color: hsl(120, 100%, 40%);">+ typename: 'pluggable_modules.Originator'</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ config-section: hangup-monitor</span><br><span style="color: hsl(120, 100%, 40%);">+ typename: 'pluggable_modules.HangupMonitor'</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ config-section: ami-config</span><br><span style="color: hsl(120, 100%, 40%);">+ typename: 'ami.AMIEventModule'</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+test-object-config:</span><br><span style="color: hsl(120, 100%, 40%);">+ connect-ami: True</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+user1-originator:</span><br><span style="color: hsl(120, 100%, 40%);">+ channel: 'Local/user1@default'</span><br><span style="color: hsl(120, 100%, 40%);">+ application: 'Echo'</span><br><span style="color: hsl(120, 100%, 40%);">+ trigger: 'ami_connect'</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+user2-originator:</span><br><span style="color: hsl(120, 100%, 40%);">+ channel: 'Local/user2@default'</span><br><span style="color: hsl(120, 100%, 40%);">+ application: 'Echo'</span><br><span style="color: hsl(120, 100%, 40%);">+ trigger: 'ami_connect'</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+user3-originator:</span><br><span style="color: hsl(120, 100%, 40%);">+ channel: 'Local/user3@default'</span><br><span style="color: hsl(120, 100%, 40%);">+ application: 'Echo'</span><br><span style="color: hsl(120, 100%, 40%);">+ trigger: 'ami_connect'</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+admin-originator:</span><br><span style="color: hsl(120, 100%, 40%);">+ channel: 'Local/admin@default'</span><br><span style="color: hsl(120, 100%, 40%);">+ application: 'Echo'</span><br><span style="color: hsl(120, 100%, 40%);">+ trigger: 'ami_connect'</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+kicker-originator:</span><br><span style="color: hsl(120, 100%, 40%);">+ channel: 'Local/kicker@default'</span><br><span style="color: hsl(120, 100%, 40%);">+ application: 'Echo'</span><br><span style="color: hsl(120, 100%, 40%);">+ trigger: 'ami_connect'</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+hangup-monitor:</span><br><span style="color: hsl(120, 100%, 40%);">+ ids: '0'</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ami-config:</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ type: 'headermatch'</span><br><span style="color: hsl(120, 100%, 40%);">+ conditions:</span><br><span style="color: hsl(120, 100%, 40%);">+ match:</span><br><span style="color: hsl(120, 100%, 40%);">+ Event: 'UserEvent'</span><br><span style="color: hsl(120, 100%, 40%);">+ UserEvent: 'ConfBridgeKick'</span><br><span style="color: hsl(120, 100%, 40%);">+ requirements:</span><br><span style="color: hsl(120, 100%, 40%);">+ match:</span><br><span style="color: hsl(120, 100%, 40%);">+ Result: 'Pass'</span><br><span style="color: hsl(120, 100%, 40%);">+ count: 4</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ type: 'headermatch'</span><br><span style="color: hsl(120, 100%, 40%);">+ conditions:</span><br><span style="color: hsl(120, 100%, 40%);">+ match:</span><br><span style="color: hsl(120, 100%, 40%);">+ Event: 'UserEvent'</span><br><span style="color: hsl(120, 100%, 40%);">+ UserEvent: 'ConfKickSuccess'</span><br><span style="color: hsl(120, 100%, 40%);">+ requirements:</span><br><span style="color: hsl(120, 100%, 40%);">+ match:</span><br><span style="color: hsl(120, 100%, 40%);">+ Result: 'Pass'</span><br><span style="color: hsl(120, 100%, 40%);">+ count: 4</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+properties:</span><br><span style="color: hsl(120, 100%, 40%);">+ tags:</span><br><span style="color: hsl(120, 100%, 40%);">+ - confbridge</span><br><span style="color: hsl(120, 100%, 40%);">+ - apps</span><br><span style="color: hsl(120, 100%, 40%);">+ dependencies:</span><br><span style="color: hsl(120, 100%, 40%);">+ - python: 'twisted'</span><br><span style="color: hsl(120, 100%, 40%);">+ - python: 'starpy'</span><br><span style="color: hsl(120, 100%, 40%);">+ - asterisk: 'app_confbridge'</span><br><span style="color: hsl(120, 100%, 40%);">+ - asterisk: 'app_userevent'</span><br><span>diff --git a/tests/apps/confbridge/tests.yaml b/tests/apps/confbridge/tests.yaml</span><br><span>index ccf2505..49d3c79 100644</span><br><span>--- a/tests/apps/confbridge/tests.yaml</span><br><span>+++ b/tests/apps/confbridge/tests.yaml</span><br><span>@@ -1,5 +1,6 @@</span><br><span> # Enter tests here in the order they should be considered for execution:</span><br><span> tests:</span><br><span style="color: hsl(120, 100%, 40%);">+ - test: 'confbridge_confkick'</span><br><span> - test: 'confbridge_dynamic_menus'</span><br><span> - test: 'confbridge_end_marked'</span><br><span> - test: 'confbridge_marked'</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/testsuite/+/15982">change 15982</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/testsuite/+/15982"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ia85d6190ab3cf88a7cc4b3071a38dee191bc8898 </div>
<div style="display:none"> Gerrit-Change-Number: 15982 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>