[asterisk-commits] Test/ARI: Test for unloading a module. (testsuite[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jul 17 09:00:06 CDT 2015
Joshua Colp has submitted this change and it was merged.
Change subject: Test/ARI: Test for unloading a module.
......................................................................
Test/ARI: Test for unloading a module.
Test that unloads a module. A '204 No Content' should be the response
to the request, followed by a '404 Not Found' reponse to a GET request
on the same module.
* Test ARI module unloading
ASTERISK-25173
Change-Id: I0518e22ff776be3e24f4d029d1ce345fb3c46f1a
---
M tests/rest_api/asterisk/modules/tests.yaml
A tests/rest_api/asterisk/modules/unload_module/configs/ast1/extensions.conf
A tests/rest_api/asterisk/modules/unload_module/configs/ast1/modules.conf
A tests/rest_api/asterisk/modules/unload_module/test-config.yaml
4 files changed, 60 insertions(+), 0 deletions(-)
Approvals:
Mark Michelson: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved; Verified
diff --git a/tests/rest_api/asterisk/modules/tests.yaml b/tests/rest_api/asterisk/modules/tests.yaml
index bbb533c..5522df2 100644
--- a/tests/rest_api/asterisk/modules/tests.yaml
+++ b/tests/rest_api/asterisk/modules/tests.yaml
@@ -3,3 +3,4 @@
- test: 'get_module'
- test: 'get_unknown_module'
- test: 'load_module'
+ - test: 'unload_module'
diff --git a/tests/rest_api/asterisk/modules/unload_module/configs/ast1/extensions.conf b/tests/rest_api/asterisk/modules/unload_module/configs/ast1/extensions.conf
new file mode 100644
index 0000000..aa88cf3
--- /dev/null
+++ b/tests/rest_api/asterisk/modules/unload_module/configs/ast1/extensions.conf
@@ -0,0 +1,6 @@
+[default]
+
+exten => s,1,NoOp()
+ same => n,Answer()
+ same => n,Stasis(testsuite)
+ same => n,Hangup()
diff --git a/tests/rest_api/asterisk/modules/unload_module/configs/ast1/modules.conf b/tests/rest_api/asterisk/modules/unload_module/configs/ast1/modules.conf
new file mode 100644
index 0000000..e5af2ee
--- /dev/null
+++ b/tests/rest_api/asterisk/modules/unload_module/configs/ast1/modules.conf
@@ -0,0 +1,5 @@
+[modules]
+
+autoload=yes
+
+load=app_confbridge.so
diff --git a/tests/rest_api/asterisk/modules/unload_module/test-config.yaml b/tests/rest_api/asterisk/modules/unload_module/test-config.yaml
new file mode 100644
index 0000000..3cae214
--- /dev/null
+++ b/tests/rest_api/asterisk/modules/unload_module/test-config.yaml
@@ -0,0 +1,48 @@
+testinfo:
+ summary: 'Test for loading a module using ARI'
+ description: |
+ Test that unloads a module. A '204 No Content' should
+ be the response to the request. Then, a GET request is
+ made that should return a '404 Not Found' to ensure the
+ module was unloaded.
+
+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: 'delete'
+ uri: 'asterisk/modules/app_confbridge.so'
+ expect: 204
+ -
+ method: 'get'
+ uri: 'asterisk/modules/app_confbridge.so'
+ expect: 404
+ -
+ method: 'delete'
+ uri: 'channels/{channel.id}'
+
+properties:
+ minversion: '13.5.0'
+ dependencies:
+ - python : autobahn.websocket
+ - python : requests
+ - python : twisted
+ - asterisk: app_confbridge
+ - asterisk: res_ari_asterisk
+ - asterisk: res_ari_channels
+ tags:
+ - ARI
--
To view, visit https://gerrit.asterisk.org/898
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0518e22ff776be3e24f4d029d1ce345fb3c46f1a
Gerrit-PatchSet: 2
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
More information about the asterisk-commits
mailing list