[svn-commits] mjordan: testsuite/asterisk/trunk r5360 - in /asterisk/trunk/tests: apps/dial...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Aug 6 20:55:40 CDT 2014
Author: mjordan
Date: Wed Aug 6 20:55:33 2014
New Revision: 5360
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=5360
Log:
extensions.lua: Add a dummy .lua dialplan extension to prevent conflicts
The samples extensions.lua has a couple of extra hints that this test does not
expect. As a result, the number of expected events received when the action
is run will not match.
This patch adds an empty extensions.lua to prevent this conflict.
Added:
asterisk/trunk/tests/manager/exten_state_list/configs/ast1/extensions.lua (with props)
asterisk/trunk/tests/rest_api/recording/duration/
asterisk/trunk/tests/rest_api/recording/duration/configs/
asterisk/trunk/tests/rest_api/recording/duration/configs/ast1/
asterisk/trunk/tests/rest_api/recording/duration/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/rest_api/recording/duration/test-config.yaml (with props)
Modified:
asterisk/trunk/tests/apps/dial/tests.yaml
asterisk/trunk/tests/rest_api/recording/tests.yaml
Modified: asterisk/trunk/tests/apps/dial/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/dial/tests.yaml?view=diff&rev=5360&r1=5359&r2=5360
==============================================================================
--- asterisk/trunk/tests/apps/dial/tests.yaml (original)
+++ asterisk/trunk/tests/apps/dial/tests.yaml Wed Aug 6 20:55:33 2014
@@ -12,3 +12,4 @@
- dir: 'mid_call_events'
- dir: 'action_post_answer'
- test: 'peer_h_exten'
+ - dir: 'forward'
Added: asterisk/trunk/tests/manager/exten_state_list/configs/ast1/extensions.lua
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/manager/exten_state_list/configs/ast1/extensions.lua?view=auto&rev=5360
==============================================================================
--- asterisk/trunk/tests/manager/exten_state_list/configs/ast1/extensions.lua (added)
+++ asterisk/trunk/tests/manager/exten_state_list/configs/ast1/extensions.lua Wed Aug 6 20:55:33 2014
@@ -1,0 +1,4 @@
+-- Keep empty. This will cause the testsuite
+-- to blow away the default extensions.lua that
+-- comes with the samples, which contains hints
+-- that will break this test.
Propchange: asterisk/trunk/tests/manager/exten_state_list/configs/ast1/extensions.lua
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/manager/exten_state_list/configs/ast1/extensions.lua
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/manager/exten_state_list/configs/ast1/extensions.lua
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/rest_api/recording/duration/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/recording/duration/configs/ast1/extensions.conf?view=auto&rev=5360
==============================================================================
--- asterisk/trunk/tests/rest_api/recording/duration/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/rest_api/recording/duration/configs/ast1/extensions.conf Wed Aug 6 20:55:33 2014
@@ -1,0 +1,21 @@
+[listener]
+exten => s,1,Answer()
+same => n,Echo()
+same => n,Hangup()
+
+[default]
+exten => s,1,NoOp()
+ same => n,Answer()
+ same => n,Stasis(testsuite)
+ same => n,Hangup()
+
+[soundtest]
+exten => audio,1,Answer()
+same => n,Set(TALK_DETECTED=0)
+same => n,BackgroundDetect(${SOUNDFILE},1,20,,20000)
+same => n,GoToIf($[${TALK_DETECTED}=0]?true:false)
+same => n(false),UserEvent(soundcheck, status: pass)
+same => n,Hangup()
+
+same => n(true),UserEvent(soundcheck, status: fail)
+same => n,Hangup()
Propchange: asterisk/trunk/tests/rest_api/recording/duration/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/rest_api/recording/duration/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/rest_api/recording/duration/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/rest_api/recording/duration/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/recording/duration/test-config.yaml?view=auto&rev=5360
==============================================================================
--- asterisk/trunk/tests/rest_api/recording/duration/test-config.yaml (added)
+++ asterisk/trunk/tests/rest_api/recording/duration/test-config.yaml Wed Aug 6 20:55:33 2014
@@ -1,0 +1,150 @@
+testinfo:
+ summary: Test detection of duration and talking_duration values of an ARI
+ recording. Also checks sound file size and energy levels.
+ description: |
+ This test creates two local channel halves that get sent into ARI.
+ One half plays the sound file once, which is tt-somethingwrong in this
+ instance, plays silence/2 to create two seconds of silence, and
+ then plays tt-somethingwrong again. The other half records the sound
+ files as they are being played. Checks the duration values then hangs up
+ the Local channel. Upon hanging up the channel, the SoundChecker
+ pluggable module checks the file size of the produced recording and also uses
+ BackgroundDetect to check if energy levels are sufficient.
+
+test-modules:
+ add-test-to-search-path: True
+ test-object:
+ config-section: test-object-config
+ typename: ari.AriOriginateTestObject
+ modules:
+ - config-section: ari-config
+ typename: ari.WebSocketEventModule
+ - config-section: sound-file-analyzer
+ typename: pluggable_modules.SoundChecker
+
+apps: testsuite
+
+test-object-config:
+ test-iterations:
+ -
+ endpoint: 'Local/s at default'
+ channelId: 'end1'
+ otherChannelId: 'end2'
+ app: 'testsuite'
+
+
+ari-config:
+ events:
+ -
+ conditions:
+ match:
+ type: StasisStart
+ application: testsuite
+ channel:
+ id: 'end1'
+ match:
+ type: StasisStart
+ application: testsuite
+ channel:
+ id: 'end2'
+ count: 1
+ requests:
+ -
+ method: 'post'
+ uri: 'channels/end1/record'
+ params:
+ name: 'the_recording'
+ format: 'wav'
+ maxSilenceSeconds: 4
+ #maxDurationSeconds: 10
+ -
+ conditions:
+ match:
+ type: RecordingStarted
+ application: testsuite
+ recording:
+ name: 'the_recording'
+ format: 'wav'
+ count: 1
+ requests:
+ -
+ method: 'post'
+ uri: 'channels/end2/play/sound1'
+ params:
+ media: 'sound:tt-somethingwrong'
+ -
+ method: 'post'
+ uri: 'channels/end2/play/sound2'
+ params:
+ media: 'sound:silence/2'
+ -
+ method: 'post'
+ uri: 'channels/end2/play/sound3'
+ params:
+ media: 'sound:tt-somethingwrong'
+ -
+ conditions:
+ match:
+ type: PlaybackFinished
+ application: testsuite
+ playback:
+ id: 'sound3'
+ target_uri: 'channel:end2$'
+ media_uri: 'sound:tt-somethingwrong'
+ count: 1
+ requests:
+ -
+ method: 'post'
+ uri: 'recordings/live/the_recording/stop'
+ -
+ conditions:
+ match:
+ type: RecordingFinished
+ application: testsuite
+ recording:
+ duration: 6
+ talking_duration: 4
+ silence_duration: 2
+ count: 1
+ requests:
+ -
+ method: 'delete'
+ uri: 'channels/end1'
+
+sound-file-analyzer:
+ auto-stop: 'true'
+ sound-file-config:
+ -
+ trigger:
+ match:
+ event: 'Hangup'
+ channel: 'Local/s at default-.*'
+ sound-file:
+ file-name: 'recording/the_recording.wav'
+ file-path-type: 'relative'
+ actions:
+ -
+ type: 'size_check'
+ size: 96000
+ tolerance: 2000
+ -
+ type: 'energy_check'
+ channel: 'Local/audio at soundtest'
+ context: 'listener'
+ exten: 's'
+ priority: '1'
+
+properties:
+ minversion: '12.5.0'
+ dependencies:
+ - python : autobahn.websocket
+ - python : requests
+ - python : twisted
+ - python : starpy
+ - asterisk : res_ari_channels
+ - asterisk : res_ari_recordings
+ - asterisk : res_stasis
+ tags:
+ - ARI
+
+
Propchange: asterisk/trunk/tests/rest_api/recording/duration/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/rest_api/recording/duration/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/rest_api/recording/duration/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: asterisk/trunk/tests/rest_api/recording/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/recording/tests.yaml?view=diff&rev=5360&r1=5359&r2=5360
==============================================================================
--- asterisk/trunk/tests/rest_api/recording/tests.yaml (original)
+++ asterisk/trunk/tests/rest_api/recording/tests.yaml Wed Aug 6 20:55:33 2014
@@ -3,4 +3,5 @@
- test: 'file_conflicts'
- test: 'format_unavailable'
- test: 'nominal'
+ - test: 'duration'
- dir: 'stored'
More information about the svn-commits
mailing list