[Asterisk-code-review] Test/ARI: Nominal test for rotating a log channel. (testsuite[master])

Benjamin Keith Ford asteriskteam at digium.com
Fri Jul 31 11:53:27 CDT 2015


Benjamin Keith Ford has uploaded a new change for review.

  https://gerrit.asterisk.org/1024

Change subject: Test/ARI: Nominal test for rotating a log channel.
......................................................................

Test/ARI: Nominal test for rotating a log channel.

This test verifies that a log channel is successfully rotated through
ARI.

* Nominal log rotation test

ASTERISK-25252

Change-Id: I657e7780ac9784727f1e2fd514688230ee404e9f
---
A tests/rest_api/asterisk/logging/rotate_log/configs/ast1/extensions.conf
A tests/rest_api/asterisk/logging/rotate_log/test-config.yaml
A tests/rest_api/asterisk/logging/tests.yaml
M tests/rest_api/asterisk/tests.yaml
4 files changed, 70 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/24/1024/1

diff --git a/tests/rest_api/asterisk/logging/rotate_log/configs/ast1/extensions.conf b/tests/rest_api/asterisk/logging/rotate_log/configs/ast1/extensions.conf
new file mode 100644
index 0000000..484f40a
--- /dev/null
+++ b/tests/rest_api/asterisk/logging/rotate_log/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/logging/rotate_log/test-config.yaml b/tests/rest_api/asterisk/logging/rotate_log/test-config.yaml
new file mode 100644
index 0000000..fa42dff
--- /dev/null
+++ b/tests/rest_api/asterisk/logging/rotate_log/test-config.yaml
@@ -0,0 +1,61 @@
+testinfo:
+    summary: 'Test for rotating logs using ARI'
+    description: |
+        Test that rotates a log channel. A '200 OK' should be
+        the response, and the test should verify that the log
+        channel was rotated successfully.
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: ari.AriTestObject
+    modules:
+        -
+            config-section: ari-test-stopper
+            typename: pluggable_modules.EventActionModule
+        -
+            config-section: ari-config
+            typename: ari.WebSocketEventModule
+
+ari-test-stopper:
+    -
+        ari-events:
+            match:
+                type: StasisEnd
+                application: testsuite
+            count: 1
+        validate-log:
+            logfile: 'messages.txt.0'
+            pass-if-present: True
+        stop_test:
+
+ari-config:
+    apps: testsuite
+    events:
+        -   
+            conditions:
+                match:
+                    type: StasisStart
+                    application: testsuite
+                    args: []
+            count: 1
+            requests:
+                -
+                    method: 'put'
+                    uri: 'asterisk/logging/messages.txt/rotate'
+                    expect: 204
+                -
+                    method: 'delete'
+                    uri: 'channels/{channel.id}'
+
+properties:
+    minversion: '13.5.0'
+    dependencies:
+        - python : autobahn.websocket
+        - python : requests
+        - python : twisted
+        - python : starpy
+        - asterisk: res_ari_asterisk
+        - asterisk: res_ari_channels
+    tags:
+        - ARI
diff --git a/tests/rest_api/asterisk/logging/tests.yaml b/tests/rest_api/asterisk/logging/tests.yaml
new file mode 100644
index 0000000..7cc938a
--- /dev/null
+++ b/tests/rest_api/asterisk/logging/tests.yaml
@@ -0,0 +1,2 @@
+tests:
+    - test: 'rotate_log'
diff --git a/tests/rest_api/asterisk/tests.yaml b/tests/rest_api/asterisk/tests.yaml
index 4bd5f73..09d2c9c 100644
--- a/tests/rest_api/asterisk/tests.yaml
+++ b/tests/rest_api/asterisk/tests.yaml
@@ -1,3 +1,4 @@
 tests:
+    - dir: 'logging'
     - dir: 'modules'
     - dir: 'config'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I657e7780ac9784727f1e2fd514688230ee404e9f
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Benjamin Keith Ford <bford at digium.com>



More information about the asterisk-code-review mailing list