[asterisk-commits] Test/ARI: Test for reloading an unloaded module (testsuite[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Jul 19 09:32:26 CDT 2015


Matt Jordan has submitted this change and it was merged.

Change subject: Test/ARI: Test for reloading an unloaded module
......................................................................


Test/ARI: Test for reloading an unloaded module

Test that reloads an unloaded module. The reloaded module that
was noloaded in the modules.conf should receive a '404 Not Found'
as the response to the request.

* receives 404 when attempting to reload an unloaded module

ASTERISK-25173

Change-Id: If8a57f52bc0417496ae357c055a5b68ee90fd3ad
---
A tests/rest_api/asterisk/modules/reload_unloaded_module/configs/ast1/extensions.conf
A tests/rest_api/asterisk/modules/reload_unloaded_module/configs/ast1/modules.conf
A tests/rest_api/asterisk/modules/reload_unloaded_module/test-config.yaml
M tests/rest_api/asterisk/modules/tests.yaml
4 files changed, 55 insertions(+), 0 deletions(-)

Approvals:
  Matt Jordan: Looks good to me, approved; Verified



diff --git a/tests/rest_api/asterisk/modules/reload_unloaded_module/configs/ast1/extensions.conf b/tests/rest_api/asterisk/modules/reload_unloaded_module/configs/ast1/extensions.conf
new file mode 100644
index 0000000..484f40a
--- /dev/null
+++ b/tests/rest_api/asterisk/modules/reload_unloaded_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/reload_unloaded_module/configs/ast1/modules.conf b/tests/rest_api/asterisk/modules/reload_unloaded_module/configs/ast1/modules.conf
new file mode 100644
index 0000000..fa43cdb
--- /dev/null
+++ b/tests/rest_api/asterisk/modules/reload_unloaded_module/configs/ast1/modules.conf
@@ -0,0 +1,5 @@
+[modules]
+
+autoload=yes
+
+noload => app_playback.so
diff --git a/tests/rest_api/asterisk/modules/reload_unloaded_module/test-config.yaml b/tests/rest_api/asterisk/modules/reload_unloaded_module/test-config.yaml
new file mode 100644
index 0000000..99fef49
--- /dev/null
+++ b/tests/rest_api/asterisk/modules/reload_unloaded_module/test-config.yaml
@@ -0,0 +1,43 @@
+testinfo:
+    summary: 'Test for reloading an unloaded module using ARI'
+    description: |
+        Test that reloads an unloaded module. The reloaded module that
+        was noloaded in the modules.conf should receive a '404 Not Found'
+        as the response to 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: 'put'
+                    uri: 'asterisk/modules/app_playback.so'
+                    expect: 404
+                -
+                    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 9c9027b..a9d16fb 100644
--- a/tests/rest_api/asterisk/modules/tests.yaml
+++ b/tests/rest_api/asterisk/modules/tests.yaml
@@ -6,3 +6,4 @@
     - test: 'unload_module'
     - test: 'unload_already_unloaded_module'
     - test: 'reload_unknown_module'
+    - test: 'reload_unloaded_module'

-- 
To view, visit https://gerrit.asterisk.org/886
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If8a57f52bc0417496ae357c055a5b68ee90fd3ad
Gerrit-PatchSet: 2
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Scott Emidy <jemidy at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>



More information about the asterisk-commits mailing list