[Asterisk-code-review] rest api: Fix ami bridge tests. (testsuite[master])
Jenkins2
asteriskteam at digium.com
Mon May 8 07:25:09 CDT 2017
Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/5582 )
Change subject: rest_api: Fix ami_bridge tests.
......................................................................
rest_api: Fix ami_bridge tests.
The ARI ami_bridge tests relied 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(-)
Approvals:
Mark Michelson: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Jenkins2: Approved for Submit
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: merged
Gerrit-Change-Id: Ieb289a4623592ab6986411bf83325876baa6a71c
Gerrit-PatchSet: 2
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
More information about the asterisk-code-review
mailing list