[asterisk-commits] Test/ARI: Test for loading a module (testsuite[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jul 15 11:57:38 CDT 2015
Mark Michelson has submitted this change and it was merged.
Change subject: Test/ARI: Test for loading a module
......................................................................
Test/ARI: Test for loading a module
Test that loads a module. The module is configured as a
noloaded module in the modules.conf configuration. It also
checks to make sure that a '204 No Content' was received back
as a response from the request.
* Loads requested module
ASTERISK-25173
Change-Id: Iaf5cbd2c144c2e54a8fa80bdf1ace6b103bff06e
---
A tests/rest_api/asterisk/modules/load_module/configs/ast1/extensions.conf
A tests/rest_api/asterisk/modules/load_module/configs/ast1/modules.conf
A tests/rest_api/asterisk/modules/load_module/test-config.yaml
M tests/rest_api/asterisk/modules/tests.yaml
4 files changed, 57 insertions(+), 0 deletions(-)
Approvals:
Mark Michelson: Looks good to me, approved; Verified
Scott Griepentrog: Looks good to me, but someone else must approve
Ashley Sanders: Looks good to me, but someone else must approve
diff --git a/tests/rest_api/asterisk/modules/load_module/configs/ast1/extensions.conf b/tests/rest_api/asterisk/modules/load_module/configs/ast1/extensions.conf
new file mode 100644
index 0000000..00d0563
--- /dev/null
+++ b/tests/rest_api/asterisk/modules/load_module/configs/ast1/extensions.conf
@@ -0,0 +1,7 @@
+[default]
+
+exten => s,1,NoOp()
+ same => n,Answer()
+ same => n,Stasis(testsuite)
+ same => n,Hangup()
+
diff --git a/tests/rest_api/asterisk/modules/load_module/configs/ast1/modules.conf b/tests/rest_api/asterisk/modules/load_module/configs/ast1/modules.conf
new file mode 100644
index 0000000..fa43cdb
--- /dev/null
+++ b/tests/rest_api/asterisk/modules/load_module/configs/ast1/modules.conf
@@ -0,0 +1,5 @@
+[modules]
+
+autoload=yes
+
+noload => app_playback.so
diff --git a/tests/rest_api/asterisk/modules/load_module/test-config.yaml b/tests/rest_api/asterisk/modules/load_module/test-config.yaml
new file mode 100644
index 0000000..ec797ba
--- /dev/null
+++ b/tests/rest_api/asterisk/modules/load_module/test-config.yaml
@@ -0,0 +1,44 @@
+testinfo:
+ summary: 'Test for loading a module using ARI'
+ description: |
+ Test that loads a module. The module is configured as a
+ noloaded module in the modules.conf configuration. It also
+ checks to make sure that a '204 No Content' was received back
+ as a response from the request.
+
+test-modules:
+ test-object:
+ typename: ari.AriTestObject
+ modules:
+ - config-section: ari-config
+ typename: ari.WebSocketEventModule
+
+ari-config:
+ apps: testsuite
+ events:
+ - conditions:
+ match:
+ type: StasisStart
+ application: testsuite
+ args: []
+ count: 1
+ requests:
+ -
+ method: 'post'
+ uri: 'asterisk/modules/app_playback.so'
+ expect: 204
+ -
+ method: 'delete'
+ uri: 'channels/{channel.id}'
+
+properties:
+ minversion: '13.5.0'
+ dependencies:
+ - python : autobahn.websocket
+ - python : requests
+ - python : twisted
+ - asterisk: app_playback
+ - asterisk: res_ari_asterisk
+ - asterisk: res_ari_channels
+ tags:
+ - ARI
diff --git a/tests/rest_api/asterisk/modules/tests.yaml b/tests/rest_api/asterisk/modules/tests.yaml
index b7fcd0e..bbb533c 100644
--- a/tests/rest_api/asterisk/modules/tests.yaml
+++ b/tests/rest_api/asterisk/modules/tests.yaml
@@ -2,3 +2,4 @@
- test: 'get_modules'
- test: 'get_module'
- test: 'get_unknown_module'
+ - test: 'load_module'
--
To view, visit https://gerrit.asterisk.org/881
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf5cbd2c144c2e54a8fa80bdf1ace6b103bff06e
Gerrit-PatchSet: 3
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Scott Emidy <jemidy at digium.com>
Gerrit-Reviewer: Ashley Sanders <asanders at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Scott Griepentrog <sgriepentrog at digium.com>
More information about the asterisk-commits
mailing list