[Asterisk-code-review] rest api: Fix ami bridge tests. (testsuite[master])
Joshua Colp
asteriskteam at digium.com
Thu May 4 16:40:18 CDT 2017
Joshua Colp has uploaded a new change for review. ( https://gerrit.asterisk.org/5582 )
Change subject: rest_api: Fix ami_bridge tests.
......................................................................
rest_api: Fix ami_bridge tests.
The ARI ami_bridge tests relyed on broken behavior of
the AMI Bridge action itself. The behavior would result in
dialplan priorities being skipped over when they shouldn't
be, causing the 'alice' channel in each test to get hung
up quickly. Since the behavior has now been fixed the
channel properly executes dialplan and results in the
Echo() application being executed until the test fails.
The tests have now been changed to restore the expected
behavior by hanging up the 'alice' channel if it is sent
into the dialplan.
ASTERISK-24529
Change-Id: Ieb289a4623592ab6986411bf83325876baa6a71c
---
M tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_different_stasis_app/configs/ast1/extensions.conf
M tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_same_stasis_app/configs/ast1/extensions.conf
M tests/rest_api/external_interaction/ami_bridge/stasis_bridge/different_stasis_app/configs/ast1/extensions.conf
M tests/rest_api/external_interaction/ami_bridge/stasis_bridge/non_stasis_bridge/configs/ast1/extensions.conf
M tests/rest_api/external_interaction/ami_bridge/stasis_bridge/same_stasis_app/configs/ast1/extensions.conf
M tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_different_stasis_app/configs/ast1/extensions.conf
M tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_same_stasis_app/configs/ast1/extensions.conf
7 files changed, 21 insertions(+), 7 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/82/5582/1
diff --git a/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_different_stasis_app/configs/ast1/extensions.conf b/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_different_stasis_app/configs/ast1/extensions.conf
index d95de58..a6de5bf 100644
--- a/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_different_stasis_app/configs/ast1/extensions.conf
+++ b/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_different_stasis_app/configs/ast1/extensions.conf
@@ -1,6 +1,8 @@
[default]
-exten => echo,1,Answer()
+exten => echo,1,NoOp()
+ same => n,ExecIf($["${CHANNEL(uniqueid)}" = "alice"]?Hangup)
+ same => n,Answer()
same => n,Echo()
same => n,Hangup()
diff --git a/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_same_stasis_app/configs/ast1/extensions.conf b/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_same_stasis_app/configs/ast1/extensions.conf
index d95de58..a6de5bf 100644
--- a/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_same_stasis_app/configs/ast1/extensions.conf
+++ b/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_same_stasis_app/configs/ast1/extensions.conf
@@ -1,6 +1,8 @@
[default]
-exten => echo,1,Answer()
+exten => echo,1,NoOp()
+ same => n,ExecIf($["${CHANNEL(uniqueid)}" = "alice"]?Hangup)
+ same => n,Answer()
same => n,Echo()
same => n,Hangup()
diff --git a/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/different_stasis_app/configs/ast1/extensions.conf b/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/different_stasis_app/configs/ast1/extensions.conf
index d95de58..a6de5bf 100644
--- a/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/different_stasis_app/configs/ast1/extensions.conf
+++ b/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/different_stasis_app/configs/ast1/extensions.conf
@@ -1,6 +1,8 @@
[default]
-exten => echo,1,Answer()
+exten => echo,1,NoOp()
+ same => n,ExecIf($["${CHANNEL(uniqueid)}" = "alice"]?Hangup)
+ same => n,Answer()
same => n,Echo()
same => n,Hangup()
diff --git a/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/non_stasis_bridge/configs/ast1/extensions.conf b/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/non_stasis_bridge/configs/ast1/extensions.conf
index 1c9d357..4696f67 100644
--- a/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/non_stasis_bridge/configs/ast1/extensions.conf
+++ b/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/non_stasis_bridge/configs/ast1/extensions.conf
@@ -1,6 +1,8 @@
[default]
-exten => echo,1,Answer()
+exten => echo,1,NoOp()
+ same => n,ExecIf($["${CHANNEL(uniqueid)}" = "alice"]?Hangup)
+ same => n,Answer()
same => n,Echo()
same => n,Hangup()
diff --git a/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/same_stasis_app/configs/ast1/extensions.conf b/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/same_stasis_app/configs/ast1/extensions.conf
index d95de58..a6de5bf 100644
--- a/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/same_stasis_app/configs/ast1/extensions.conf
+++ b/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/same_stasis_app/configs/ast1/extensions.conf
@@ -1,6 +1,8 @@
[default]
-exten => echo,1,Answer()
+exten => echo,1,NoOp()
+ same => n,ExecIf($["${CHANNEL(uniqueid)}" = "alice"]?Hangup)
+ same => n,Answer()
same => n,Echo()
same => n,Hangup()
diff --git a/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_different_stasis_app/configs/ast1/extensions.conf b/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_different_stasis_app/configs/ast1/extensions.conf
index d95de58..a6de5bf 100644
--- a/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_different_stasis_app/configs/ast1/extensions.conf
+++ b/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_different_stasis_app/configs/ast1/extensions.conf
@@ -1,6 +1,8 @@
[default]
-exten => echo,1,Answer()
+exten => echo,1,NoOp()
+ same => n,ExecIf($["${CHANNEL(uniqueid)}" = "alice"]?Hangup)
+ same => n,Answer()
same => n,Echo()
same => n,Hangup()
diff --git a/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_same_stasis_app/configs/ast1/extensions.conf b/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_same_stasis_app/configs/ast1/extensions.conf
index d95de58..a6de5bf 100644
--- a/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_same_stasis_app/configs/ast1/extensions.conf
+++ b/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_same_stasis_app/configs/ast1/extensions.conf
@@ -1,6 +1,8 @@
[default]
-exten => echo,1,Answer()
+exten => echo,1,NoOp()
+ same => n,ExecIf($["${CHANNEL(uniqueid)}" = "alice"]?Hangup)
+ same => n,Answer()
same => n,Echo()
same => n,Hangup()
--
To view, visit https://gerrit.asterisk.org/5582
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb289a4623592ab6986411bf83325876baa6a71c
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
More information about the asterisk-code-review
mailing list