[asterisk-commits] rest api/channels/playback/lists: Add a test for the 'revers... (testsuite[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu May 19 08:45:36 CDT 2016
Anonymous Coward #1000019 has submitted this change and it was merged.
Change subject: rest_api/channels/playback/lists: Add a test for the 'reverse' operation
......................................................................
rest_api/channels/playback/lists: Add a test for the 'reverse' operation
This patch adds a test for the 'reverse' operation. It verifies that the
'reverse' operation will execute on any media file in the playlist and
rewind the sound file.
ASTERISK-26022
Change-Id: Ic2fa858682c4ccc6eadcd725e74d91a215486e9f
---
A tests/rest_api/channels/playback/lists/reverse/test-config.yaml
M tests/rest_api/channels/playback/lists/tests.yaml
2 files changed, 144 insertions(+), 2 deletions(-)
Approvals:
Anonymous Coward #1000019: Verified
Joshua Colp: Looks good to me, approved
diff --git a/tests/rest_api/channels/playback/lists/reverse/test-config.yaml b/tests/rest_api/channels/playback/lists/reverse/test-config.yaml
new file mode 100644
index 0000000..60ec322
--- /dev/null
+++ b/tests/rest_api/channels/playback/lists/reverse/test-config.yaml
@@ -0,0 +1,143 @@
+testinfo:
+ summary: Tests that the forward ARI playback command works on channels as intended
+ description: |
+ This test puts a local channel half into Stasis, and the other into the Echo
+ application. Starts an ARI playback of tt-monkeys on a channel, and as soon
+ as the playback starts, fastforwards the playback. Test passes if a playback
+ Reverse TestEvent gets received.
+
+test-modules:
+ test-object:
+ config-section: test-object-config
+ typename: ari.AriOriginateTestObject
+ modules:
+ -
+ config-section: ari-config
+ typename: ari.WebSocketEventModule
+ -
+ config-section: ari-test-stopper
+ typename: pluggable_modules.EventActionModule
+ -
+ config-section: asterisk-config
+ typename: pluggable_modules.AsteriskConfigModule
+ -
+ config-section: ami-config
+ typename: ami.AMIEventModule
+
+asterisk-config:
+ -
+ src: 'tests/rest_api/channels/playback/lists/configs/extensions.conf'
+ dst: 'extensions.conf'
+
+test-object-config:
+ stop-on-end: False
+
+ari-test-stopper:
+ -
+ ari-events:
+ match:
+ type: ChannelDestroyed
+ application: testsuite
+ channel:
+ id: 'testsuite-default-id$'
+ stop_test:
+
+ari-config:
+ apps: testsuite
+ events:
+ -
+ conditions:
+ match:
+ type: StasisStart
+ application: testsuite
+ channel:
+ id: 'testsuite-default-id$'
+ count: 1
+ requests:
+ -
+ method: 'post'
+ uri: 'channels/testsuite-default-id/play/list'
+ params:
+ media: 'sound:tt-monkeys,sound:tt-weasels'
+ -
+ conditions:
+ match:
+ type: PlaybackStarted
+ application: testsuite
+ playback:
+ id: 'list'
+ target_uri: 'channel:testsuite-default-id$'
+ media_uri: 'sound:tt-monkeys'
+ count: 1
+ requests:
+ -
+ delay: 1
+ method: 'post'
+ uri: 'playbacks/list/control?operation=reverse'
+ -
+ conditions:
+ match:
+ type: PlaybackContinuing
+ application: testsuite
+ playback:
+ id: 'list'
+ target_uri: 'channel:testsuite-default-id$'
+ media_uri: 'sound:tt-monkeys'
+ -
+ conditions:
+ match:
+ type: PlaybackStarted
+ application: testsuite
+ playback:
+ id: 'list'
+ target_uri: 'channel:testsuite-default-id$'
+ media_uri: 'sound:tt-weasels'
+ count: 1
+ requests:
+ -
+ delay: 1
+ method: 'post'
+ uri: 'playbacks/list/control?operation=reverse'
+ -
+ delay: 3
+ method: 'delete'
+ uri: 'playbacks/list'
+ -
+ conditions:
+ match:
+ type: PlaybackFinished
+ application: testsuite
+ playback:
+ id: 'list'
+ target_uri: 'channel:testsuite-default-id$'
+ media_uri: 'sound:tt-weasels'
+ count: 1
+ requests:
+ -
+ method: 'delete'
+ uri: 'channels/testsuite-default-id'
+
+ami-config:
+ -
+ type: 'headermatch'
+ id: '0'
+ conditions:
+ match:
+ Event: 'TestEvent'
+ State: 'PLAYBACK'
+ Control: 'Rewind'
+ SkipMs: '3000'
+ count: 2
+
+properties:
+ buildoption: 'TEST_FRAMEWORK'
+ minversion: '14.0.0'
+ dependencies:
+ - python : autobahn.websocket
+ - python : requests
+ - python : twisted
+ - python : starpy
+ - asterisk : res_ari_channels
+ - asterisk : res_ari_playbacks
+ tags:
+ - ARI
diff --git a/tests/rest_api/channels/playback/lists/tests.yaml b/tests/rest_api/channels/playback/lists/tests.yaml
index e4a2518..858b701 100644
--- a/tests/rest_api/channels/playback/lists/tests.yaml
+++ b/tests/rest_api/channels/playback/lists/tests.yaml
@@ -1,5 +1,4 @@
tests:
- test: 'basic'
- test: 'forward'
-
-
+ - test: 'reverse'
--
To view, visit https://gerrit.asterisk.org/2848
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic2fa858682c4ccc6eadcd725e74d91a215486e9f
Gerrit-PatchSet: 2
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
More information about the asterisk-commits
mailing list