[Asterisk-code-review] endpoints/statsd: Update test to use new condition based mat... (testsuite[13])
George Joseph
asteriskteam at digium.com
Thu Jun 28 07:35:59 CDT 2018
George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/9279 )
Change subject: endpoints/statsd: Update test to use new condition based matching
......................................................................
endpoints/statsd: Update test to use new condition based matching
The statsd tests were written in a way that did not allow for flexible message
matching. A previous patch added condition based message handling and matching
routines that allow greater flexibility in matching messages.
This patch updates the endpoints/statsd test to take advantage of that. It also
removes an unneeded dependency.
Change-Id: I4c3b5e1efe063b047d41f8c7f4c4674324af2650
---
M tests/endpoints/statsd/test-config.yaml
1 file changed, 21 insertions(+), 36 deletions(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Jenkins2: Approved for Submit
diff --git a/tests/endpoints/statsd/test-config.yaml b/tests/endpoints/statsd/test-config.yaml
index 560eede..752c969 100644
--- a/tests/endpoints/statsd/test-config.yaml
+++ b/tests/endpoints/statsd/test-config.yaml
@@ -12,8 +12,8 @@
typename: 'test_case.TestCaseModule'
modules:
-
- typename: 'mockd.MockDServer'
- config-section: 'statsd-config'
+ config-section: event-action-config
+ typename: 'pluggable_modules.EventActionModule'
-
typename: 'pluggable_modules.Originator'
config-section: 'originator-config'
@@ -29,38 +29,25 @@
hangup-monitor:
ids: '0'
-# Note: due to a bug in getting duplicate endpoint events over
-# Stasis, we'll see two statsd messages for the channel counts
-# for an Endpoint. When that is fixed, the duplicate messages
-# below should be removed.
-statsd-config:
- prefix: 'endpoints'
- regex: True
- packets:
- -
- 'endpoints\.count:\+1\|g'
- -
- 'endpoints\.state\.online:\+1\|g'
- -
- 'endpoints\.count:\+1\|g'
- -
- 'endpoints\.state\.unknown:\+1\|g'
- -
- 'endpoints\.PJSIP\.test\.channels:1\|g'
- -
- 'endpoints\.PJSIP\.test\.channels:2\|g'
- -
- 'endpoints\.PJSIP\.test\.channels:1\|g'
- -
- 'endpoints\.PJSIP\.test\.channels:0\|g'
- -
- 'endpoints\.count:\-1\|g'
- -
- 'endpoints\.state\.online:\-1\|g'
- -
- 'endpoints\.count:\-1\|g'
- -
- 'endpoints\.state\.unknown:\-1\|g'
+event-action-config:
+ event:
+ type: 'matcher_listener.Udp'
+ conditions:
+ -
+ 'endpoints\.count:\+1\|g'
+ -
+ 'endpoints\.state\.online:\+1\|g'
+ -
+ match: 'endpoints\.PJSIP\.test\.channels:1\|g'
+ count: 2
+ -
+ 'endpoints\.PJSIP\.test\.channels:2\|g'
+ -
+ 'endpoints\.PJSIP\.test\.channels:0\|g'
+ -
+ 'endpoints\.state\.online:\-1\|g'
+ -
+ 'endpoints\.count:\-1\|g'
originator-config:
channel: 'PJSIP/test'
@@ -77,7 +64,5 @@
- python: 'autobahn.websocket'
- python: 'starpy'
- python: 'twisted'
- - app: 'statsd'
tags:
- statsd
- - apps
--
To view, visit https://gerrit.asterisk.org/9279
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: testsuite
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: I4c3b5e1efe063b047d41f8c7f4c4674324af2650
Gerrit-Change-Number: 9279
Gerrit-PatchSet: 3
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180628/f91c9370/attachment.html>
More information about the asterisk-code-review
mailing list