[asterisk-commits] Test/ARI: Nominal test for adding a log channel. (testsuite[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Aug 7 11:44:06 CDT 2015
Joshua Colp has submitted this change and it was merged.
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(-)
Approvals:
Mark Michelson: Looks good to me, but someone else must approve
Ashley Sanders: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved; Verified
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: merged
Gerrit-Change-Id: I60be913cad475b0c13cc4fdeff4c4e2212e704f7
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Ashley Sanders <asanders at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
More information about the asterisk-commits
mailing list