[Asterisk-code-review] Test/ARI: Test for unloading an invalid module/already in us... (testsuite[master])
Scott Emidy
asteriskteam at digium.com
Wed Jul 15 11:08:43 CDT 2015
Scott Emidy has uploaded a new change for review.
https://gerrit.asterisk.org/897
Change subject: Test/ARI: Test for unloading an invalid module/already in use module
......................................................................
Test/ARI: Test for unloading an invalid module/already in use module
Test that unloads an invalid module and a dependent module
that is already in use. The test checks that a '404 Not Found'
is received for an invalid module name, and a '409 Conflict'
is recieved for a dependency module that is already in use.
* Receives 404 for invalid module name
* Receives 409 for module that is already in use
ASTERISK-25173
Change-Id: I96e0fce6deb09dd265df4fa67e4e82eff04b1378
---
M tests/rest_api/asterisk/modules/tests.yaml
A tests/rest_api/asterisk/modules/unload_already_unloaded_module/configs/ast1/extensions.conf
A tests/rest_api/asterisk/modules/unload_already_unloaded_module/test-config.yaml
3 files changed, 58 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/97/897/3
diff --git a/tests/rest_api/asterisk/modules/tests.yaml b/tests/rest_api/asterisk/modules/tests.yaml
index b7fcd0e..b3ec7c3 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: 'unload_already_unloaded_module'
diff --git a/tests/rest_api/asterisk/modules/unload_already_unloaded_module/configs/ast1/extensions.conf b/tests/rest_api/asterisk/modules/unload_already_unloaded_module/configs/ast1/extensions.conf
new file mode 100644
index 0000000..00d0563
--- /dev/null
+++ b/tests/rest_api/asterisk/modules/unload_already_unloaded_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/unload_already_unloaded_module/test-config.yaml b/tests/rest_api/asterisk/modules/unload_already_unloaded_module/test-config.yaml
new file mode 100644
index 0000000..766756d
--- /dev/null
+++ b/tests/rest_api/asterisk/modules/unload_already_unloaded_module/test-config.yaml
@@ -0,0 +1,50 @@
+testinfo:
+ summary: 'Test for unloading an invalid module using ARI'
+ description: |
+ Test that unloads an invalid module and a dependent module
+ that is already in use. The test checks that a '404 Not Found'
+ is received for an invalid module name, and a '409 Conflict'
+ is recieved for a dependency module that is already in use.
+
+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:
+ # Test that checks for invalid module name
+ -
+ method: 'delete'
+ uri: 'asterisk/modules/blah.so'
+ expect: 404
+ # Test that checks for dependency module that is in use
+ -
+ method: 'delete'
+ uri: 'asterisk/modules/res_stasis.so'
+ expect: 409
+ -
+ method: 'delete'
+ uri: 'channels/{channel.id}'
+
+properties:
+ minversion: '13.5.0'
+ dependencies:
+ - python : autobahn.websocket
+ - python : requests
+ - python : twisted
+ - asterisk: res_stasis
+ - asterisk: res_ari_asterisk
+ - asterisk: res_ari_channels
+ tags:
+ - ARI
--
To view, visit https://gerrit.asterisk.org/897
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I96e0fce6deb09dd265df4fa67e4e82eff04b1378
Gerrit-PatchSet: 3
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Scott Emidy <jemidy at digium.com>
More information about the asterisk-code-review
mailing list