Author: jbigelow Date: Tue Dec 30 10:35:31 2014 New Revision: 6150 URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=6150 Log: Testsuite: Add external bridging tests - Stasis bridge to non-stasis application.
This adds a couple external bridging tests for Stasis application interaction. These specifically cover tests 2.1.2 & 2.1.3 as defined on the Test Plan at: https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=30279826 One test doesn't use any option flags for the Bridge() app while the other uses the 'x' option flag. Note: The test not using any option flags for the Bridge() app fails due to ASTERISK-24637. The YAML config 'expected-result: False' has been set for this test. Once the bug has been resolved the config line should be removed. (closes issue ASTERISK-24583) Review: https://reviewboard.asterisk.org/r/4291/ Added: asterisk/trunk/tests/rest_api/external_interaction/bridge_app/ asterisk/trunk/tests/rest_api/external_interaction/bridge_app/stasis_bridge/ asterisk/trunk/tests/rest_api/external_interaction/bridge_app/stasis_bridge/configs/ asterisk/trunk/tests/rest_api/external_interaction/bridge_app/stasis_bridge/configs/ast1/ asterisk/trunk/tests/rest_api/external_interaction/bridge_app/stasis_bridge/configs/ast1/extensions.conf (with props) asterisk/trunk/tests/rest_api/external_interaction/bridge_app/stasis_bridge/test-config.yaml (with props) asterisk/trunk/tests/rest_api/external_interaction/bridge_app/tests.yaml (with props) asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/ asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/ asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/configs/ asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/configs/ast1/ asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/configs/ast1/extensions.conf (with props) asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/test-config.yaml (with props) asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/tests.yaml (with props) Modified: asterisk/trunk/tests/rest_api/external_interaction/tests.yaml Added: asterisk/trunk/tests/rest_api/external_interaction/bridge_app/stasis_bridge/configs/ast1/extensions.conf URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/external_interaction/bridge_app/stasis_bridge/configs/ast1/extensions.conf?view=auto&rev=6150 ============================================================================== --- asterisk/trunk/tests/rest_api/external_interaction/bridge_app/stasis_bridge/configs/ast1/extensions.conf (added) +++ asterisk/trunk/tests/rest_api/external_interaction/bridge_app/stasis_bridge/configs/ast1/extensions.conf Tue Dec 30 10:35:31 2014 @@ -1,0 +1,21 @@ +[default] +exten => app_stasis,1,NoOp() + same => n,Answer() + same => n,Stasis(testsuite,test) + same => n,UserEvent(BridgeAppExit,result:passed) + same => n,Hangup() + +exten => app_bridge,1,NoOp() + same => n,Answer() + same => n,Bridge(alice\;2) + same => n,Hangup() + +exten => echo,1,NoOp() + same => n,Answer() + same => n,Echo() + same => n,Hangup() + +exten => dummy,1,Answer + same => n,Stasis(testsuite,dummy) + same => n,Hangup + Propchange: asterisk/trunk/tests/rest_api/external_interaction/bridge_app/stasis_bridge/configs/ast1/extensions.conf ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/rest_api/external_interaction/bridge_app/stasis_bridge/configs/ast1/extensions.conf ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/rest_api/external_interaction/bridge_app/stasis_bridge/configs/ast1/extensions.conf ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/rest_api/external_interaction/bridge_app/stasis_bridge/test-config.yaml URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/external_interaction/bridge_app/stasis_bridge/test-config.yaml?view=auto&rev=6150 ============================================================================== --- asterisk/trunk/tests/rest_api/external_interaction/bridge_app/stasis_bridge/test-config.yaml (added) +++ asterisk/trunk/tests/rest_api/external_interaction/bridge_app/stasis_bridge/test-config.yaml Tue Dec 30 10:35:31 2014 @@ -1,0 +1,152 @@ +testinfo: + summary: | + "Ensure channel in Stasis bridge can be pulled out using the Bridge() + app and resumes at the priority after the Stasis() app." + description: | + "This test originates a Local channel (dummy) channel into + Stasis(testsuite,dummy) and Echo() to kick off the test. A Stasis + bridge is created (test_bridge) along with originating a Local channel + (alice) into Stasis(testsuite,test) and Echo(). The alice channel is + then added to the Stasis bridge upon a StasisStart event. + + A Local channel (bob) is originated into Bridge() and echo(). This + causes the alice channel half in the Stasis bridge to be pulled out and + put into a non-stasis bridge with the bob channel half. The bob channel + half in the non-stasis bridge with alice is then hung up. + + This ensures that the alice channel half is not re-entered into the + Stasis(testsuite,test) app and instead executes the priority following + it. The StasisStart and StasisEnd events are all also checked to ensure + they occur the proper number of times." + issues: + - jira: 'ASTERISK-24637' + +properties: + minversion: '12.8.0' + dependencies: + - python : autobahn.websocket + - python : requests + - python : twisted + - python : starpy + - asterisk : res_ari_channels + - asterisk : res_ari_bridges + - asterisk : app_echo + tags: + - ARI + # Expect test to fail until ASTERISK-24637 is resolved. + expected-result: False + +test-modules: + test-object: + config-section: test-object-config + typename: ari.AriOriginateTestObject + modules: + - + config-section: pluggable-config + typename: 'pluggable_modules.EventActionModule' + +test-object-config: + apps: testsuite + test-iterations: + - + channelId: 'dummy' + endpoint: 'Local/dummy@default' + context: 'default' + extension: 'echo' + priority: '1' + +pluggable-config: + - + ari-events: + match: + type: StasisStart + application: testsuite + args: ['dummy'] + channel: + id: 'dummy;2' + count: 1 + ari-requests: + - + method: 'post' + uri: 'bridges/test_bridge' + - + method: 'post' + uri: 'channels/alice' + params: + endpoint: 'Local/app_stasis@default' + context: 'default' + extension: 'echo' + priority: '1' + - + ari-events: + match: + type: StasisStart + application: testsuite + args: ['test'] + channel: + id: 'alice;2' + count: 1 + ari-requests: + method: 'post' + uri: 'bridges/test_bridge/addChannel' + params: + channel: '{channel.id}' + - + ari-events: + match: + type: ChannelEnteredBridge + channel: + id: 'alice;2' + count: 1 + ari-requests: + method: 'post' + uri: 'channels/bob' + params: + endpoint: 'Local/app_bridge@default' + context: 'default' + extension: 'echo' + priority: '1' + - + ari-events: + match: + type: ChannelLeftBridge + bridge: + id: 'test_bridge' + channel: + id: 'alice;2' + count: 1 + ari-requests: + method: 'delete' + uri: 'bridges/test_bridge' + - + ari-events: + match: + type: StasisEnd + application: testsuite + channel: + id: 'alice;2' + count: 1 + - + ami-events: + conditions: + match: + Event: BridgeEnter + uniqueid: 'bob;2' + nomatch: + bridgecreator: 'Stasis' + count: 1 + ari-requests: + method: 'delete' + uri: 'channels/bob;2' + - + ami-events: + conditions: + match: + Event: UserEvent + UserEvent: 'BridgeAppExit' + result: 'passed' + count: 1 + ari-requests: + method: 'delete' + uri: 'channels/dummy;2' + Propchange: asterisk/trunk/tests/rest_api/external_interaction/bridge_app/stasis_bridge/test-config.yaml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/rest_api/external_interaction/bridge_app/stasis_bridge/test-config.yaml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/rest_api/external_interaction/bridge_app/stasis_bridge/test-config.yaml ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/rest_api/external_interaction/bridge_app/tests.yaml URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/external_interaction/bridge_app/tests.yaml?view=auto&rev=6150 ============================================================================== --- asterisk/trunk/tests/rest_api/external_interaction/bridge_app/tests.yaml (added) +++ asterisk/trunk/tests/rest_api/external_interaction/bridge_app/tests.yaml Tue Dec 30 10:35:31 2014 @@ -1,0 +1,3 @@ +tests: + - test: 'stasis_bridge' + - dir: 'x_option' Propchange: asterisk/trunk/tests/rest_api/external_interaction/bridge_app/tests.yaml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/rest_api/external_interaction/bridge_app/tests.yaml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/rest_api/external_interaction/bridge_app/tests.yaml ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/configs/ast1/extensions.conf URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/configs/ast1/extensions.conf?view=auto&rev=6150 ============================================================================== --- asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/configs/ast1/extensions.conf (added) +++ asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/configs/ast1/extensions.conf Tue Dec 30 10:35:31 2014 @@ -1,0 +1,20 @@ +[default] +exten => app_stasis,1,NoOp() + same => n,Answer() + same => n,Stasis(testsuite,test) + same => n,Hangup(38) + +exten => app_bridge,1,NoOp() + same => n,Answer() + same => n,Bridge(alice\;2,x) + same => n,Hangup(38) + +exten => echo,1,NoOp() + same => n,Answer() + same => n,Echo() + same => n,Hangup() + +exten => dummy,1,Answer + same => n,Stasis(testsuite,dummy) + same => n,Hangup() + Propchange: asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/configs/ast1/extensions.conf ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/configs/ast1/extensions.conf ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/configs/ast1/extensions.conf ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/test-config.yaml URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/test-config.yaml?view=auto&rev=6150 ============================================================================== --- asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/test-config.yaml (added) +++ asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/test-config.yaml Tue Dec 30 10:35:31 2014 @@ -1,0 +1,161 @@ +testinfo: + summary: | + "Ensure channel in Stasis bridge can be pulled out using the Bridge() + app and is hung up per the 'x' option specified for Bridge()." + description: | + "This test originates a Local channel (dummy) channel into + Stasis(testsuite,dummy) and Echo() to kick off the test. A Stasis + bridge is created (test_bridge) along with originating a Local channel + (alice) into Stasis(testsuite,test) and Echo(). The alice channel is + then added to the Stasis bridge upon a StasisStart event. + + A Local channel (bob) is originated into Bridge() with the 'x' option + used and echo(). This causes the alice channel half in the Stasis + bridge to be pulled out and put into a non-stasis bridge with the bob + channel half. The bob channel half in the non-stasis bridge with alice + is then hung up. + + This ensures that the alice channel half is hung up without re-entering + Stasis(testsuite,test) or continuing on in the dial plan. The + StasisStart and StasisEnd events are all also checked to ensure they + occur the proper number of times." + +properties: + minversion: '12.8.0' + dependencies: + - python : autobahn.websocket + - python : requests + - python : twisted + - python : starpy + - asterisk : res_ari_channels + - asterisk : res_ari_bridges + - asterisk : app_echo + tags: + - ARI + +test-modules: + test-object: + config-section: test-object-config + typename: ari.AriOriginateTestObject + modules: + - + config-section: pluggable-config + typename: 'pluggable_modules.EventActionModule' + +test-object-config: + apps: testsuite + test-iterations: + - + channelId: 'dummy' + endpoint: 'Local/dummy@default' + context: 'default' + extension: 'echo' + priority: '1' + +pluggable-config: + - + ari-events: + match: + type: StasisStart + application: testsuite + args: ['dummy'] + channel: + id: 'dummy;2' + count: 1 + ari-requests: + - + method: 'post' + uri: 'bridges/test_bridge' + - + method: 'post' + uri: 'channels/alice' + params: + endpoint: 'Local/app_stasis@default' + context: 'default' + extension: 'echo' + priority: '1' + - + ari-events: + match: + type: StasisStart + application: testsuite + args: ['test'] + channel: + id: 'alice;2' + count: 1 + ari-requests: + method: 'post' + uri: 'bridges/test_bridge/addChannel' + params: + channel: '{channel.id}' + - + ari-events: + match: + type: ChannelEnteredBridge + channel: + id: 'alice;2' + count: 1 + ari-requests: + method: 'post' + uri: 'channels/bob' + params: + endpoint: 'Local/app_bridge@default' + context: 'default' + extension: 'echo' + priority: '1' + - + ari-events: + match: + type: ChannelLeftBridge + bridge: + id: 'test_bridge' + channel: + id: 'alice;2' + count: 1 + ari-requests: + method: 'delete' + uri: 'bridges/test_bridge' + - + ari-events: + match: + type: StasisEnd + application: testsuite + channel: + id: 'alice;2' + count: 1 + - + ami-events: + conditions: + match: + Event: BridgeEnter + Uniqueid: 'bob;2' + nomatch: + Bridgecreator: 'Stasis' + count: 1 + ari-requests: + - + method: 'delete' + uri: 'channels/bob;2' + - + method: 'delete' + uri: 'channels/dummy;2' + # Ensure alice leaves the non-stasis bridge + - + ami-events: + conditions: + match: + Event: BridgeLeave + Uniqueid: 'alice;2' + nomatch: + Bridgecreator: 'Stasis' + count: 1 + # Ensure alice channel halves are hung up with cause 16 and not 38 + - + ami-events: + conditions: + match: + Event: Hangup + Uniqueid: 'alice.*' + Cause: '16' + count: 2 + Propchange: asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/test-config.yaml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/test-config.yaml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/test-config.yaml ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/tests.yaml URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/tests.yaml?view=auto&rev=6150 ============================================================================== --- asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/tests.yaml (added) +++ asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/tests.yaml Tue Dec 30 10:35:31 2014 @@ -1,0 +1,2 @@ +tests: + - test: 'stasis_bridge' Propchange: asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/tests.yaml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/tests.yaml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/rest_api/external_interaction/bridge_app/x_option/tests.yaml ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: asterisk/trunk/tests/rest_api/external_interaction/tests.yaml URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/external_interaction/tests.yaml?view=diff&rev=6150&r1=6149&r2=6150 ============================================================================== --- asterisk/trunk/tests/rest_api/external_interaction/tests.yaml (original) +++ asterisk/trunk/tests/rest_api/external_interaction/tests.yaml Tue Dec 30 10:35:31 2014 @@ -3,3 +3,4 @@ - dir: 'attended_transfer' - dir: 'ami_bridge' - dir: 'ami_redirect' + - dir: 'bridge_app' -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- svn-commits mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/svn-commits
