[Asterisk-code-review] Test/ARI: Test for reloading a module (testsuite[master])

Scott Emidy asteriskteam at digium.com
Tue Jul 14 15:25:13 CDT 2015


Scott Emidy has uploaded a new change for review.

  https://gerrit.asterisk.org/885

Change subject: Test/ARI: Test for reloading a module
......................................................................

Test/ARI: Test for reloading a module

Test that reloads a module. The reloaded module should
receive a '204 No Content' as the response to the request.

* Reloads a single module

ASTERISK-25173

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


  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/85/885/1

diff --git a/tests/rest_api/asterisk/modules/reload_module/configs/ast1/extensions.conf b/tests/rest_api/asterisk/modules/reload_module/configs/ast1/extensions.conf
new file mode 100644
index 0000000..00d0563
--- /dev/null
+++ b/tests/rest_api/asterisk/modules/reload_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/reload_module/configs/ast1/modules.conf b/tests/rest_api/asterisk/modules/reload_module/configs/ast1/modules.conf
new file mode 100644
index 0000000..def8cfe
--- /dev/null
+++ b/tests/rest_api/asterisk/modules/reload_module/configs/ast1/modules.conf
@@ -0,0 +1,5 @@
+[modules]
+
+autoload=yes
+
+load => app_playback.so
diff --git a/tests/rest_api/asterisk/modules/reload_module/test-config.yaml b/tests/rest_api/asterisk/modules/reload_module/test-config.yaml
new file mode 100644
index 0000000..1f7578a
--- /dev/null
+++ b/tests/rest_api/asterisk/modules/reload_module/test-config.yaml
@@ -0,0 +1,42 @@
+testinfo:
+    summary: 'Test for reloading a module using ARI'
+    description: |
+        Test that reloads a module. The reloaded module should
+        receive a '204 No Content' 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: 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 49e365b..dcd5f09 100644
--- a/tests/rest_api/asterisk/modules/tests.yaml
+++ b/tests/rest_api/asterisk/modules/tests.yaml
@@ -1,3 +1,4 @@
 tests:
     - test: 'get_modules'
     - test: 'get_module'
+    - test: 'reload_module'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iac1bde95312be682d4c845b68f217f3ef36d3cb4
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Scott Emidy <jemidy at digium.com>



More information about the asterisk-code-review mailing list