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

Benjamin Keith Ford asteriskteam at digium.com
Thu Aug 6 13:17:41 CDT 2015


Benjamin Keith Ford has uploaded a new change for review.

  https://gerrit.asterisk.org/1047

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

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

This test verifies that adding a log channel through ARI returns
the correct response code and successfully adds a log channel.

* Nominal add log test

ASTERISK-25252

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


  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/47/1047/1

diff --git a/tests/rest_api/asterisk/logging/add_log/configs/ast1/extensions.conf b/tests/rest_api/asterisk/logging/add_log/configs/ast1/extensions.conf
new file mode 100644
index 0000000..484f40a
--- /dev/null
+++ b/tests/rest_api/asterisk/logging/add_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/add_log/configs/ast1/logger.conf b/tests/rest_api/asterisk/logging/add_log/configs/ast1/logger.conf
new file mode 100644
index 0000000..d4724b6
--- /dev/null
+++ b/tests/rest_api/asterisk/logging/add_log/configs/ast1/logger.conf
@@ -0,0 +1,4 @@
+[logfiles]
+
+messages => notice,warning,error
+full => notice,warning,error,debug,verbose,dtmf,fax
diff --git a/tests/rest_api/asterisk/logging/add_log/test-config.yaml b/tests/rest_api/asterisk/logging/add_log/test-config.yaml
new file mode 100644
index 0000000..cf6ac7b
--- /dev/null
+++ b/tests/rest_api/asterisk/logging/add_log/test-config.yaml
@@ -0,0 +1,53 @@
+testinfo:
+    summary: 'Test for adding logs using ARI'
+    description: |
+        Test that adds a log channel. A '204 No Content' should be
+        the response, and the test should verify that the log
+        channel was added successfully.
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: ari.AriTestObject
+    modules:
+        -
+            config-section: ari-config
+            typename: pluggable_modules.EventActionModule
+
+ari-config:
+    -
+        ari-events:
+            match:
+                type: StasisStart
+                application: testsuite
+            count: 1
+        ari-requests:
+            -
+                method: 'post'
+                uri: 'asterisk/logging/testlog?configuration=notice,warning'
+                expect: 204
+            -
+                method: 'delete'
+                uri: 'channels/{channel.id}'
+    -
+        ari-events:
+            match:
+                type: StasisEnd
+                application: testsuite
+            count: 1
+        validate-log:
+            logfile: 'testlog'
+            pass-if-present: True
+        stop_test:
+
+properties:
+    minversion: '13.6.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
index 7fec8b9..2988b98 100644
--- a/tests/rest_api/asterisk/logging/tests.yaml
+++ b/tests/rest_api/asterisk/logging/tests.yaml
@@ -1,3 +1,4 @@
 tests:
     - test: 'get_logging'
     - test: 'rotate_log'
+    - test: 'add_log'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I60be913cad475b0c13cc4fdeff4c4e2212e704f7
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