[Asterisk-code-review] app_macro: remove tests from Testsuite (testsuite[master])

Friendly Automation asteriskteam at digium.com
Thu Jan 26 14:46:25 CST 2023


Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/testsuite/+/19789 )

Change subject: app_macro: remove tests from Testsuite
......................................................................

app_macro: remove tests from Testsuite

The following tests are removed:

tests/apps/dial/mid_call_events/dial_macro
tests/apps/macro
tests/connected_line/macro
tests/redirecting/macro

ASTERISK-30304

Change-Id: I059a79f1c680267c68b4ecb98347ddcc48084420
---
D tests/apps/dial/mid_call_events/dial_macro/configs/ast1/extensions.conf
D tests/apps/dial/mid_call_events/dial_macro/test-config.yaml
M tests/apps/dial/mid_call_events/tests.yaml
D tests/apps/macro/park_timeout_inside/configs/ast1/extensions.conf
D tests/apps/macro/park_timeout_inside/configs/ast1/res_parking.conf
D tests/apps/macro/park_timeout_inside/test-config.yaml
D tests/apps/macro/park_timeout_outside/configs/ast1/extensions.conf
D tests/apps/macro/park_timeout_outside/configs/ast1/res_parking.conf
D tests/apps/macro/park_timeout_outside/test-config.yaml
D tests/apps/macro/redirect_inside/configs/ast1/extensions.conf
D tests/apps/macro/redirect_inside/test-config.yaml
D tests/apps/macro/redirect_outside/configs/ast1/extensions.conf
D tests/apps/macro/redirect_outside/test-config.yaml
D tests/apps/macro/tests.yaml
A tests/apps/queues/gosub_test/configs/ast1/extensions.conf
R tests/apps/queues/gosub_test/configs/ast1/queues.conf
A tests/apps/queues/gosub_test/run-test
R tests/apps/queues/gosub_test/test-config.yaml
R tests/apps/queues/gosub_test/test.lua
D tests/apps/queues/macro_gosub_test/configs/ast1/extensions.conf
D tests/apps/queues/macro_gosub_test/run-test
M tests/apps/queues/tests.yaml
M tests/apps/tests.yaml
M tests/cdr/cdr_dial_subroutines/configs/ast1/extensions.conf
M tests/cdr/cdr_dial_subroutines/test-config.yaml
D tests/connected_line/macro/configs/ast1/extensions.conf
D tests/connected_line/macro/run-test
D tests/connected_line/macro/test-config.yaml
M tests/connected_line/tests.yaml
D tests/redirecting/macro/configs/ast1/extensions.conf
D tests/redirecting/macro/run-test
D tests/redirecting/macro/test-config.yaml
M tests/redirecting/tests.yaml
33 files changed, 58 insertions(+), 902 deletions(-)

Approvals:
  N A: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, but someone else must approve
  Benjamin Keith Ford: Looks good to me, approved
  Friendly Automation: Approved for Submit




diff --git a/tests/apps/dial/mid_call_events/dial_macro/configs/ast1/extensions.conf b/tests/apps/dial/mid_call_events/dial_macro/configs/ast1/extensions.conf
deleted file mode 100644
index 2060145..0000000
--- a/tests/apps/dial/mid_call_events/dial_macro/configs/ast1/extensions.conf
+++ /dev/null
@@ -1,58 +0,0 @@
-[macro-mid_call]
-
-exten => s,1,NoOp()
- same => n,Set(MACRO_RESULT=${ARG1})
- same => n,UserEvent(MidCall, result: ${MACRO_RESULT})
-
-[macro-mid_call_goto_full]
-
-exten => s,1,NoOp()
- same => n,Set(MACRO_RESULT=GOTO:goto_full_context^goto_full_jump^1)
- same => n,UserEvent(MidCall, result: ${MACRO_RESULT})
-
-[default]
-
-exten => abort,1,NoOp()
- same => n,Dial(Local/target,,M(mid_call^ABORT))
- same => n,Hangup()
-
-exten => congestion,1,NoOp()
- same => n,Dial(Local/target,,M(mid_call^CONGESTION))
- same => n,Hangup()
-
-exten => busy,1,NoOp()
- same => n,Dial(Local/target,,M(mid_call^BUSY))
- same => n,Hangup()
-
-exten => continue,1,NoOp()
- same => n,Dial(Local/target,,M(mid_call^CONTINUE))
- same => n,UserEvent(Continue)
- same => n,Hangup()
-
-exten => goto,1,NoOp()
- same => n,Dial(Local/target,,M(mid_call^GOTO:jump))
- same => n,UserEvent(Jump, result: failed)
- same => n,Hangup()
- same => n(jump),NoOp()
- same => n,UserEvent(Jump, result: passed)
- same => n,Hangup()
-
-exten => goto_full,1,NoOp()
- same => n,Dial(Local/target,,M(mid_call_goto_full))
- same => n,UserEvent(Jump, result: failed)
- same => n,Hangup()
-
-exten => invalid,1,NoOp()
- same => n,Dial(Local/target,,M(mid_call^BLAH))
- same => n,Hangup()
-
-exten => target,1,NoOp()
- same => n,Answer()
- same => n,Echo()
-
-[goto_full_context]
-
-exten => goto_full_jump,1,NoOp()
- same => n,UserEvent(Jump, result: passed)
- same => n,Hangup()
-
diff --git a/tests/apps/dial/mid_call_events/dial_macro/test-config.yaml b/tests/apps/dial/mid_call_events/dial_macro/test-config.yaml
deleted file mode 100644
index b7a1081..0000000
--- a/tests/apps/dial/mid_call_events/dial_macro/test-config.yaml
+++ /dev/null
@@ -1,300 +0,0 @@
-testinfo:
-    summary: 'Test mid-call Macro execution during a dial'
-    description: |
-        This test verifies mid-call Macro execution using the M option
-        on the calling channel during a dial. Execution occurs after the
-        called channel has answered but before bridging. The test verifies
-        that the result of the Macro affects the overall result of the Dial.
-
-test-modules:
-    test-object:
-        config-section: test-config
-        typename: 'test_case.SimpleTestCase'
-    modules:
-      -
-        config-section: 'ami-config'
-        typename: 'ami.AMIEventModule'
-      -
-        config-section: 'dial-events-12'
-        typename: 'ami.AMIEventModule'
-      -
-        config-section: cdr-config-12
-        typename: 'cdr.CDRModule'
-      -
-        config-section: 'hangup-bridged-12'
-        typename: 'pluggable_modules.AMIChannelHangup'
-
-test-config:
-  spawn-after-hangup: True
-  expected_events: 0
-  ignore-originate-failures: True
-  test-iterations:
-    -
-      channel: 'Local/abort at default'
-      application: 'Echo'
-    -
-      channel: 'Local/busy at default'
-      application: 'Echo'
-    -
-      channel: 'Local/congestion at default'
-      application: 'Echo'
-    -
-      channel: 'Local/continue at default'
-      application: 'Echo'
-    -
-      channel: 'Local/goto at default'
-      application: 'Echo'
-    -
-      channel: 'Local/goto_full at default'
-      application: 'Echo'
-    -
-      channel: 'Local/invalid at default'
-      application: 'Echo'
-
-ami-config:
-  -
-    type: 'headermatch'
-    conditions:
-      match:
-          Event: 'UserEvent'
-          UserEvent: 'MidCall'
-    count: '7'
-  -
-    type: 'headermatch'
-    conditions:
-      match:
-          Event: 'UserEvent'
-          UserEvent: 'Jump'
-    requirements:
-      match:
-          result: 'pass'
-    count: '2'
-
-dial-events-12:
-  -
-    type: 'headermatch'
-    conditions:
-      match:
-        Event: 'DialEnd'
-        Channel: 'Local/abort-.{8};2'
-    requirements:
-        DestChannel: 'Local/target-.{8};1'
-        DialStatus: 'ABORT'
-  -
-    type: 'headermatch'
-    conditions:
-      match:
-        Event: 'DialEnd'
-        Channel: 'Local/busy-.{8};2'
-    requirements:
-        DestChannel: 'Local/target-.{8};1'
-        DialStatus: 'BUSY'
-  -
-    type: 'headermatch'
-    conditions:
-      match:
-        Event: 'DialEnd'
-        Channel: 'Local/congestion-.{8};2'
-    requirements:
-        DestChannel: 'Local/target-.{8};1'
-        DialStatus: 'CONGESTION'
-  -
-    type: 'headermatch'
-    conditions:
-      match:
-        Event: 'DialEnd'
-        Channel: 'Local/continue-.{8};2'
-    requirements:
-        DestChannel: 'Local/target-.{8};1'
-        DialStatus: 'CONTINUE'
-  -
-    type: 'headermatch'
-    conditions:
-      match:
-        Event: 'DialEnd'
-        Channel: 'Local/goto-.{8};2'
-    requirements:
-        DestChannel: 'Local/target-.{8};1'
-        DialStatus: 'GOTO:jump'
-  -
-    type: 'headermatch'
-    conditions:
-      match:
-        Event: 'DialEnd'
-        Channel: 'Local/goto_full-.{8};2'
-    requirements:
-        DestChannel: 'Local/target-.{8};1'
-        DialStatus: 'GOTO:goto_full_context,goto_full_jump,1'
-  -
-    type: 'headermatch'
-    conditions:
-      match:
-        Event: 'DialEnd'
-        Channel: 'Local/invalid at default-.{8};2'
-      requirements:
-        DestChannel: 'Local/target at default-.{8};1'
-        DialStatus: 'ANSWER'
-    count: '1'
-
-hangup-bridged-12:
-    type: 'headermatch'
-    delay: 2
-    conditions:
-        match:
-            Event: 'BridgeEnter'
-            Channel: 'Local/invalid at default-.{8};2'
-
-cdr-config-12:
-    -
-        file: 'Master'
-        lines:
-            -
-                accountcode: ''
-                destination: 'target'
-                dcontext: 'default'
-                callerid: '"" <>'
-                channel: 'Local/target at default-.{8};2'
-                dchannel: ''
-                lastapp: 'Answer'
-                disposition: 'ANSWERED'
-                amaflags: 'DOCUMENTATION'
-            -
-                accountcode: ''
-                destination: 'abort'
-                dcontext: 'default'
-                callerid: '"" <>'
-                channel: 'Local/abort at default-.{8};2'
-                dchannel: 'Local/target at default-.{8};1'
-                lastapp: 'Dial'
-                disposition: 'FAILED'
-                amaflags: 'DOCUMENTATION'
-            -
-                accountcode: ''
-                destination: 'target'
-                dcontext: 'default'
-                callerid: '"" <>'
-                channel: 'Local/target at default-.{8};2'
-                dchannel: ''
-                lastapp: 'Answer'
-                disposition: 'ANSWERED'
-                amaflags: 'DOCUMENTATION'
-            -
-                accountcode: ''
-                destination: 'busy'
-                dcontext: 'default'
-                callerid: '"" <>'
-                channel: 'Local/busy at default-.{8};2'
-                dchannel: 'Local/target at default-.{8};1'
-                lastapp: 'Dial'
-                disposition: 'BUSY'
-                amaflags: 'DOCUMENTATION'
-            -
-                accountcode: ''
-                destination: 'target'
-                dcontext: 'default'
-                callerid: '"" <>'
-                channel: 'Local/target at default-.{8};2'
-                dchannel: ''
-                lastapp: 'Answer'
-                disposition: 'ANSWERED'
-                amaflags: 'DOCUMENTATION'
-            -
-                accountcode: ''
-                destination: 'congestion'
-                dcontext: 'default'
-                callerid: '"" <>'
-                channel: 'Local/congestion at default-.{8};2'
-                dchannel: 'Local/target at default-.{8};1'
-                lastapp: 'Dial'
-                disposition: 'FAILED'
-                amaflags: 'DOCUMENTATION'
-            -
-                accountcode: ''
-                destination: 'target'
-                dcontext: 'default'
-                callerid: '"" <>'
-                channel: 'Local/target at default-.{8};2'
-                dchannel: ''
-                lastapp: 'Answer'
-                disposition: 'ANSWERED'
-                amaflags: 'DOCUMENTATION'
-            -
-                accountcode: ''
-                destination: 'continue'
-                dcontext: 'default'
-                callerid: '"" <>'
-                channel: 'Local/continue at default-.{8};2'
-                dchannel: 'Local/target at default-.{8};1'
-                lastapp: 'Dial'
-                disposition: 'FAILED'
-                amaflags: 'DOCUMENTATION'
-            -
-                accountcode: ''
-                destination: 'target'
-                dcontext: 'default'
-                callerid: '"" <>'
-                channel: 'Local/target at default-.{8};2'
-                dchannel: ''
-                lastapp: 'Answer'
-                disposition: 'ANSWERED'
-                amaflags: 'DOCUMENTATION'
-            -
-                accountcode: ''
-                destination: 'goto'
-                dcontext: 'default'
-                callerid: '"" <>'
-                channel: 'Local/goto at default-.{8};2'
-                dchannel: 'Local/target at default-.{8};1'
-                lastapp: 'Dial'
-                disposition: 'FAILED'
-                amaflags: 'DOCUMENTATION'
-            -
-                accountcode: ''
-                destination: 'target'
-                dcontext: 'default'
-                callerid: '"" <>'
-                channel: 'Local/target at default-.{8};2'
-                dchannel: ''
-                lastapp: 'Answer'
-                disposition: 'ANSWERED'
-                amaflags: 'DOCUMENTATION'
-            -
-                accountcode: ''
-                destination: 'goto_full'
-                dcontext: 'default'
-                callerid: '"" <>'
-                channel: 'Local/goto_full at default-.{8};2'
-                dchannel: 'Local/target at default-.{8};1'
-                lastapp: 'Dial'
-                disposition: 'FAILED'
-                amaflags: 'DOCUMENTATION'
-            -
-                accountcode: ''
-                destination: 'invalid'
-                dcontext: 'default'
-                callerid: '"" <>'
-                channel: 'Local/invalid at default-.{8};2'
-                dchannel: 'Local/target at default-.{8};1'
-                lastapp: 'Dial'
-                disposition: 'ANSWERED'
-                amaflags: 'DOCUMENTATION'
-            -
-                dcontext: 'default'
-                lastapp: 'Echo'
-            -
-                dcontext: 'default'
-                lastapp: 'Echo'
-
-properties:
-    dependencies:
-        - python : 'twisted'
-        - python : 'starpy'
-        - asterisk: 'app_dial'
-        - asterisk: 'app_echo'
-        - asterisk: 'app_macro'
-        - asterisk: 'app_userevent'
-        - asterisk: 'cdr_csv'
-        - asterisk: 'pbx_config'
-    tags:
-        - dial
-        - CDR
diff --git a/tests/apps/dial/mid_call_events/tests.yaml b/tests/apps/dial/mid_call_events/tests.yaml
index aab45d1..1dbc211 100644
--- a/tests/apps/dial/mid_call_events/tests.yaml
+++ b/tests/apps/dial/mid_call_events/tests.yaml
@@ -1,4 +1,3 @@
 # Enter tests here in the order they should be considered for execution:
 tests:
-    - test: 'dial_gosub'
-    - test: 'dial_macro'
+    - test: 'dial_gosub'
\ No newline at end of file
diff --git a/tests/apps/macro/park_timeout_inside/configs/ast1/extensions.conf b/tests/apps/macro/park_timeout_inside/configs/ast1/extensions.conf
deleted file mode 100644
index 9e360fd..0000000
--- a/tests/apps/macro/park_timeout_inside/configs/ast1/extensions.conf
+++ /dev/null
@@ -1,18 +0,0 @@
-[macro-park_me]
-exten => s,1,NoOp(Inside macro)
-same => n,Park(default,sc(macro-park_me,s,500))
-same => n,Hangup()
-
-; After a park timeout to here we are no longer running a Macro
-; but just executing extensions within a context.
-same => 500,NoOp(Channel timed out of parking lot)
-same => n,UserEvent(ParkTimeout)
-same => n,Echo()
-same => n,Hangup()
-
-
-[default]
-
-exten => s,1,NoOp(Initial dialplan location)
-same => n,Macro(park_me)
-same => n,Hangup()
diff --git a/tests/apps/macro/park_timeout_inside/configs/ast1/res_parking.conf b/tests/apps/macro/park_timeout_inside/configs/ast1/res_parking.conf
deleted file mode 100644
index 51d655c..0000000
--- a/tests/apps/macro/park_timeout_inside/configs/ast1/res_parking.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-[general]
-
-[default]
-parkingtime = 3
diff --git a/tests/apps/macro/park_timeout_inside/test-config.yaml b/tests/apps/macro/park_timeout_inside/test-config.yaml
deleted file mode 100644
index d8e85e2..0000000
--- a/tests/apps/macro/park_timeout_inside/test-config.yaml
+++ /dev/null
@@ -1,29 +0,0 @@
-testinfo:
-    summary: 'Timeout a parked channel that is within a Macro to an exten inside the macro context'
-    description: |
-        Park a channel that is within an active Macro and have it timeout
-        to a location inside of that macro context, verify that it gets redirected
-        to the expected dialplan location.
-
-properties:
-    dependencies:
-        - python : 'twisted'
-        - python : 'starpy'
-        - asterisk: 'app_echo'
-        - asterisk: 'app_macro'
-        - asterisk: 'app_userevent'
-        - asterisk: 'res_parking'
-    tags:
-        - macro
-        - parking
-
-test-modules:
-    test-object:
-        config-section: test-config
-        typename: 'test_case.SimpleTestCase'
-
-test-config:
-    test-iterations:
-        -
-            channel: 'Local/s at default'
-            application: 'Echo'
diff --git a/tests/apps/macro/park_timeout_outside/configs/ast1/extensions.conf b/tests/apps/macro/park_timeout_outside/configs/ast1/extensions.conf
deleted file mode 100644
index 175f08b..0000000
--- a/tests/apps/macro/park_timeout_outside/configs/ast1/extensions.conf
+++ /dev/null
@@ -1,16 +0,0 @@
-[macro-park_me]
-exten => s,1,NoOp(Inside macro)
-same => n,Park(default,sc(default,park_timeout,1))
-same => n,Hangup()
-
-
-[default]
-
-exten => s,1,NoOp(Initial dialplan location)
-same => n,Macro(park_me)
-same => n,Hangup()
-
-exten => park_timeout,1,NoOp(Channel timed out of parking lot)
-same => n,UserEvent(ParkTimeout)
-same => n,Echo()
-same => n,Hangup()
diff --git a/tests/apps/macro/park_timeout_outside/configs/ast1/res_parking.conf b/tests/apps/macro/park_timeout_outside/configs/ast1/res_parking.conf
deleted file mode 100644
index 51d655c..0000000
--- a/tests/apps/macro/park_timeout_outside/configs/ast1/res_parking.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-[general]
-
-[default]
-parkingtime = 3
diff --git a/tests/apps/macro/park_timeout_outside/test-config.yaml b/tests/apps/macro/park_timeout_outside/test-config.yaml
deleted file mode 100644
index 11c8f77..0000000
--- a/tests/apps/macro/park_timeout_outside/test-config.yaml
+++ /dev/null
@@ -1,29 +0,0 @@
-testinfo:
-    summary: 'Timeout a parked channel that is within a Macro to an exten outside the macro'
-    description: |
-        Park a channel that is within an active Macro and have it timeout
-        to a location outside of that macro, verify that it gets redirected
-        to the expected dialplan location.
-
-properties:
-    dependencies:
-        - python : 'twisted'
-        - python : 'starpy'
-        - asterisk: 'app_echo'
-        - asterisk: 'app_macro'
-        - asterisk: 'app_userevent'
-        - asterisk: 'res_parking'
-    tags:
-        - macro
-        - parking
-
-test-modules:
-    test-object:
-        config-section: test-config
-        typename: 'test_case.SimpleTestCase'
-
-test-config:
-    test-iterations:
-        -
-            channel: 'Local/s at default'
-            application: 'Echo'
diff --git a/tests/apps/macro/redirect_inside/configs/ast1/extensions.conf b/tests/apps/macro/redirect_inside/configs/ast1/extensions.conf
deleted file mode 100644
index c45120b..0000000
--- a/tests/apps/macro/redirect_inside/configs/ast1/extensions.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-[macro-redirect_me]
-exten => s,1,NoOp(Inside macro)
-same => n,Echo()
-same => n,Hangup()
-
-; After a redirect to here we are no longer running a Macro
-; but just executing extensions within a context.
-same => 500,NoOp(Channel redirected)
-same => n,UserEvent(Redirected)
-same => n,Echo()
-same => n,Hangup()
-
-
-[default]
-
-exten => s,1,NoOp(Initial dialplan location)
-same => n,Answer()
-same => n,Macro(redirect_me)
-same => n,Hangup()
diff --git a/tests/apps/macro/redirect_inside/test-config.yaml b/tests/apps/macro/redirect_inside/test-config.yaml
deleted file mode 100644
index 59b3772..0000000
--- a/tests/apps/macro/redirect_inside/test-config.yaml
+++ /dev/null
@@ -1,74 +0,0 @@
-testinfo:
-    summary: 'Redirect a channel that is within a Macro to an exten inside the macro context'
-    description: |
-        Redirect a channel that is in the Echo application within an
-        active Macro to a location inside of that macro context, verify
-        that it gets redirected to the expected dialplan location.
-
-properties:
-    dependencies:
-        - python : 'twisted'
-        - python : 'starpy'
-        - asterisk: 'app_echo'
-        - asterisk: 'app_macro'
-        - asterisk: 'app_userevent'
-    tags:
-        - manager
-        - macro
-
-test-modules:
-    test-object:
-        config-section: test-config
-        typename: 'test_case.SimpleTestCase'
-    modules:
-        -
-            config-section: event-action-config
-            typename: 'pluggable_modules.EventActionModule'
-
-test-config:
-    test-iterations:
-        -
-            channel: 'Local/s at default'
-            application: 'Echo'
-
-event-action-config:
-    -
-        ami-events:
-            # The Newexten event is the only event available in v11+
-            # that we can trigger on to know when we are in the Macro
-            # and about to enter the Echo application.
-            #
-            # Sending a UserEvent could work but the SimpleTestCase
-            # initiates the next call in the test-iterations list or
-            # ends the test if there are no more.  We would need some
-            # dummy 'keepalive' calls to keep the test going.
-            conditions:
-                match:
-                    Event: 'Newexten'
-                    Context: 'macro-redirect_me'
-                    # Exten: 's'
-                    # or
-                    # Extension: 's'
-                    Priority: '2'
-            requirements:
-                # For sanity this is supposed to be the priority
-                # executing the Echo application.
-                match:
-                   Application: 'Echo'
-            count: '1'
-            trigger-on-count: True
-        ami-actions:
-            # Redirect the channel to somewhere inside the macro context
-            action:
-                Action: 'Redirect'
-                Channel: 'Local/s at default-00000000;2'
-                Context: 'macro-redirect_me'
-                Exten: 's'
-                Priority: '500'
-    -
-        ami-events:
-            conditions:
-                match:
-                    Event: 'UserEvent'
-                    UserEvent: 'Redirected'
-            count: '1'
diff --git a/tests/apps/macro/redirect_outside/configs/ast1/extensions.conf b/tests/apps/macro/redirect_outside/configs/ast1/extensions.conf
deleted file mode 100644
index c1989a0..0000000
--- a/tests/apps/macro/redirect_outside/configs/ast1/extensions.conf
+++ /dev/null
@@ -1,17 +0,0 @@
-[macro-redirect_me]
-exten => s,1,NoOp(Inside macro)
-same => n,Echo()
-same => n,Hangup()
-
-
-[default]
-
-exten => s,1,NoOp(Initial dialplan location)
-same => n,Answer()
-same => n,Macro(redirect_me)
-same => n,Hangup()
-
-exten => redirect,1,NoOp(Channel redirected)
-same => n,UserEvent(Redirected)
-same => n,Echo()
-same => n,Hangup()
diff --git a/tests/apps/macro/redirect_outside/test-config.yaml b/tests/apps/macro/redirect_outside/test-config.yaml
deleted file mode 100644
index 109abc6..0000000
--- a/tests/apps/macro/redirect_outside/test-config.yaml
+++ /dev/null
@@ -1,74 +0,0 @@
-testinfo:
-    summary: 'Redirect a channel that is within a Macro to an exten outside the macro'
-    description: |
-        Redirect a channel that is in the Echo application within an
-        active Macro to a location outside of that macro, verify
-        that it gets redirected to the expected dialplan location.
-
-properties:
-    dependencies:
-        - python : 'twisted'
-        - python : 'starpy'
-        - asterisk: 'app_echo'
-        - asterisk: 'app_macro'
-        - asterisk: 'app_userevent'
-    tags:
-        - manager
-        - macro
-
-test-modules:
-    test-object:
-        config-section: test-config
-        typename: 'test_case.SimpleTestCase'
-    modules:
-        -
-            config-section: event-action-config
-            typename: 'pluggable_modules.EventActionModule'
-
-test-config:
-    test-iterations:
-        -
-            channel: 'Local/s at default'
-            application: 'Echo'
-
-event-action-config:
-    -
-        ami-events:
-            # The Newexten event is the only event available in v11+
-            # that we can trigger on to know when we are in the Macro
-            # and about to enter the Echo application.
-            #
-            # Sending a UserEvent could work but the SimpleTestCase
-            # initiates the next call in the test-iterations list or
-            # ends the test if there are no more.  We would need some
-            # dummy 'keepalive' calls to keep the test going.
-            conditions:
-                match:
-                    Event: 'Newexten'
-                    Context: 'macro-redirect_me'
-                    # Exten: 's'
-                    # or
-                    # Extension: 's'
-                    Priority: '2'
-            requirements:
-                # For sanity this is supposed to be the priority
-                # executing the Echo application.
-                match:
-                   Application: 'Echo'
-            count: '1'
-            trigger-on-count: True
-        ami-actions:
-            # Redirect the channel to somewhere outside the macro
-            action:
-                Action: 'Redirect'
-                Channel: 'Local/s at default-00000000;2'
-                Context: 'default'
-                Exten: 'redirect'
-                Priority: '1'
-    -
-        ami-events:
-            conditions:
-                match:
-                    Event: 'UserEvent'
-                    UserEvent: 'Redirected'
-            count: '1'
diff --git a/tests/apps/macro/tests.yaml b/tests/apps/macro/tests.yaml
deleted file mode 100644
index f019b58..0000000
--- a/tests/apps/macro/tests.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-# Enter tests here in the order they should be considered for execution:
-tests:
-    - test: 'park_timeout_inside'
-    - test: 'park_timeout_outside'
-    - test: 'redirect_inside'
-    - test: 'redirect_outside'
diff --git a/tests/apps/queues/gosub_test/configs/ast1/extensions.conf b/tests/apps/queues/gosub_test/configs/ast1/extensions.conf
new file mode 100644
index 0000000..32b0a92
--- /dev/null
+++ b/tests/apps/queues/gosub_test/configs/ast1/extensions.conf
@@ -0,0 +1,19 @@
+[test_context]
+
+exten => answerer,1,Answer
+exten => answerer,n,Wait(2)
+exten => answerer,n,Hangup
+
+exten => test1,1,Queue(test_queue)
+exten => test1,n,Hangup
+
+exten => test2,1,Queue(test_queue,,,,,,secondarygosub)
+exten => test2,n,Hangup
+
+[primarygosub]
+exten => s,1,Set(GOSUBVAR=primarygosub)
+exten => s,n,Return
+
+[secondarygosub]
+exten => s,1,Set(GOSUBVAR=secondarygosub)
+exten => s,n,Return
diff --git a/tests/apps/queues/macro_gosub_test/configs/ast1/queues.conf b/tests/apps/queues/gosub_test/configs/ast1/queues.conf
similarity index 75%
rename from tests/apps/queues/macro_gosub_test/configs/ast1/queues.conf
rename to tests/apps/queues/gosub_test/configs/ast1/queues.conf
index f4d9270..253fb42 100644
--- a/tests/apps/queues/macro_gosub_test/configs/ast1/queues.conf
+++ b/tests/apps/queues/gosub_test/configs/ast1/queues.conf
@@ -1,4 +1,3 @@
 [test_queue]
-membermacro=primarymacro
 membergosub=primarygosub
 member => Local/answerer at test_context/n
diff --git a/tests/apps/queues/gosub_test/run-test b/tests/apps/queues/gosub_test/run-test
new file mode 100755
index 0000000..1b6319f
--- /dev/null
+++ b/tests/apps/queues/gosub_test/run-test
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+set -e
+
+asttest -a /$AST_TEST_ROOT -s `dirname $0` $@
diff --git a/tests/apps/queues/macro_gosub_test/test-config.yaml b/tests/apps/queues/gosub_test/test-config.yaml
similarity index 71%
rename from tests/apps/queues/macro_gosub_test/test-config.yaml
rename to tests/apps/queues/gosub_test/test-config.yaml
index 17de102..dde49ed 100644
--- a/tests/apps/queues/macro_gosub_test/test-config.yaml
+++ b/tests/apps/queues/gosub_test/test-config.yaml
@@ -3,8 +3,8 @@
     skip: 'Skip while failures are debugged'
     description: |
         'This test runs two calls through a queue. The queue is configured to run
-        a particular macro and gosub when a member answers. For the first call, we
-        ensure that the configured membermacro and membergosub are executed. In the
+        a particular gosub when a member answers. For the first call, we
+        ensure that the configured membergosub are executed. In the
         second call, we give overriding parameters to the Queue() application and
         ensure that those are run instead.'
 
@@ -12,6 +12,5 @@
     dependencies:
         - app: 'asttest'
     tags:
-        - macro
         - gosub
         - queues
diff --git a/tests/apps/queues/macro_gosub_test/test.lua b/tests/apps/queues/gosub_test/test.lua
similarity index 82%
rename from tests/apps/queues/macro_gosub_test/test.lua
rename to tests/apps/queues/gosub_test/test.lua
index b5fc58b..dd7810d 100644
--- a/tests/apps/queues/macro_gosub_test/test.lua
+++ b/tests/apps/queues/gosub_test/test.lua
@@ -21,11 +21,6 @@
 end
 
 function primary(event)
-	if event["Variable"] == "MACROVAR" then
-		if event["Value"] == "primarymacro" then
-			passmacro = true
-		end
-	end
 	if event["Variable"] == "GOSUBVAR" then
 		if event["Value"] == "primarygosub" then
 			passgosub = true
@@ -34,11 +29,6 @@
 end
 
 function secondary(event)
-	if event["Variable"] == "MACROVAR" then
-		if event["Value"] == "secondarymacro" then
-			passmacro = true
-		end
-	end
 	if event["Variable"] == "GOSUBVAR" then
 		if event["Value"] == "secondarygosub" then
 			passgosub = true
@@ -47,7 +37,6 @@
 end
 
 function test_call(exten, man, handler)
-	passmacro = false
 	passgosub = false
 	local orig = ast.manager.action:new("Originate")
 	man:register_event("VarSet", handler)
@@ -66,8 +55,8 @@
 
 	--When the originate returns, we know that the member
 	--has answered the call, but we can't guarantee that
-	--the macro or gosub has actually run, so sleep for a
-	--sec for safety's sake
+	--the gosub has actually run, so sleep for a sec for
+	--safety's sake
 	posix.sleep(1)
 	res, err = man:pump_messages()
 	if not res then
@@ -77,10 +66,6 @@
 	man:process_events()
 	man:unregister_event("VarSet", handler)
 
-	if not passmacro then
-		fail("Did not get expected macro variable set")
-	end
-
 	if not passgosub then
 		fail("Did not get expected gosub variable set")
 	end
diff --git a/tests/apps/queues/macro_gosub_test/configs/ast1/extensions.conf b/tests/apps/queues/macro_gosub_test/configs/ast1/extensions.conf
deleted file mode 100644
index 4152f87..0000000
--- a/tests/apps/queues/macro_gosub_test/configs/ast1/extensions.conf
+++ /dev/null
@@ -1,27 +0,0 @@
-[test_context]
-
-exten => answerer,1,Answer
-exten => answerer,n,Wait(2)
-exten => answerer,n,Hangup
-
-exten => test1,1,Queue(test_queue)
-exten => test1,n,Hangup
-
-exten => test2,1,Queue(test_queue,,,,,,secondarymacro,secondarygosub)
-exten => test2,n,Hangup
-
-[macro-primarymacro]
-exten => s,1,Set(MACROVAR=primarymacro)
-exten => s,n,MacroExit
-
-[macro-secondarymacro]
-exten => s,1,Set(MACROVAR=secondarymacro)
-exten => s,n,MacroExit
-
-[primarygosub]
-exten => s,1,Set(GOSUBVAR=primarygosub)
-exten => s,n,Return
-
-[secondarygosub]
-exten => s,1,Set(GOSUBVAR=secondarygosub)
-exten => s,n,Return
diff --git a/tests/apps/queues/macro_gosub_test/run-test b/tests/apps/queues/macro_gosub_test/run-test
deleted file mode 100755
index 553d75f..0000000
--- a/tests/apps/queues/macro_gosub_test/run-test
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-set -e
-
-asttest -a /$AST_TEST_ROOT -s tests/queues/macro_gosub_test
diff --git a/tests/apps/queues/tests.yaml b/tests/apps/queues/tests.yaml
index e1c0d0c..6e8e4d1 100644
--- a/tests/apps/queues/tests.yaml
+++ b/tests/apps/queues/tests.yaml
@@ -10,7 +10,7 @@
     - test: 'queue_no_answer'
     - test: 'queue_one_paused_no_answer'
     - test: 'queue_penalty_outside_range'
-    - test: 'macro_gosub_test'
+    - test: 'gosub_test'
     - test: 'ringinuse_and_pause'
     - test: 'wrapup_time'
     - test: 'wrapup_time_per_member'
diff --git a/tests/apps/tests.yaml b/tests/apps/tests.yaml
index f74ba8e..19797b0 100644
--- a/tests/apps/tests.yaml
+++ b/tests/apps/tests.yaml
@@ -12,7 +12,6 @@
     - dir: 'chanspy'
     - dir: 'queues'
     - dir: 'directed_pickup'
-    - dir: 'macro'
     - test: 'mixmonitor'
     - test: 'mixmonitor_rxtx'
     - test: 'mixmonitor_audiohook_inherit'
diff --git a/tests/cdr/cdr_dial_subroutines/configs/ast1/extensions.conf b/tests/cdr/cdr_dial_subroutines/configs/ast1/extensions.conf
index 6302506..6cbb01a 100644
--- a/tests/cdr/cdr_dial_subroutines/configs/ast1/extensions.conf
+++ b/tests/cdr/cdr_dial_subroutines/configs/ast1/extensions.conf
@@ -10,18 +10,18 @@
  same => n,GoSub(subroutines,dialer_2000,1)
  same => n,Hangup()
 
-; Use a macro to dial 4000
+; Use a subroutine to dial 4000
 exten => 3000,1,NoOp()
- same => n,Macro(dialer_3000)
+ same => n,GoSub(subroutines,dialer_3000,1)
  same => n,Hangup()
 
-; Use a subroutine => macro => subroutine to dial 5000
+; Use a subroutine => subroutine to dial 5000
 exten => 4000,1,NoOp()
  same => n,Wait(1)
  same => n,GoSub(subroutines,dialer_4000,1)
  same => n,Hangup()
 
-; Called from the macro that dials 4000 as well
+; Called from the subroutine that dials 4000 as well
 exten => 4001,1,NoOp()
  same => n,Busy()
  same => n,Hangup()
@@ -38,21 +38,15 @@
  same => n,Dial(Local/3000 at default/n)
  same => n,Return()
 
+; Perform a parallel dial to 4000
+exten => dialer_3000,1,NoOp()
+ same => n,Dial(Local/4000 at default/n&Local/4001 at default/n)
+ same => n,(end),Return
+
 exten => dialer_4000,1,NoOp()
- same => n,Macro(dialer_4000)
+ same => n,GoSub(subroutines,dialer_4000_bounce_back,1)
  same => n,Return()
 
 exten => dialer_4000_bounce_back,1,NoOp()
  same => n,Dial(Local/5000 at default/n)
- same => n,Return()
-
-[macro-dialer_3000]
-
-; Perform a parallel dial to 4000
-exten => s,1,NoOp()
- same => n,Dial(Local/4000 at default/n&Local/4001 at default/n)
-
-[macro-dialer_4000]
-
-exten => s,1,NoOp()
- same => n,GoSub(subroutines,dialer_4000_bounce_back,1)
+ same => n,Return()
\ No newline at end of file
diff --git a/tests/cdr/cdr_dial_subroutines/test-config.yaml b/tests/cdr/cdr_dial_subroutines/test-config.yaml
index 7bddedd..e686b61 100644
--- a/tests/cdr/cdr_dial_subroutines/test-config.yaml
+++ b/tests/cdr/cdr_dial_subroutines/test-config.yaml
@@ -111,7 +111,6 @@
         - asterisk : 'cdr_csv'
         - asterisk : 'app_dial'
         - asterisk : 'app_echo'
-        - asterisk : 'app_macro'
         - asterisk : 'app_playback'
         - asterisk : 'app_stack'
     tags:
diff --git a/tests/connected_line/macro/configs/ast1/extensions.conf b/tests/connected_line/macro/configs/ast1/extensions.conf
deleted file mode 100644
index 9381e3b..0000000
--- a/tests/connected_line/macro/configs/ast1/extensions.conf
+++ /dev/null
@@ -1,26 +0,0 @@
-[test]
-exten => 100,1,NoOp
-exten => 100,n,Set(__CONNECTED_LINE_CALLER_SEND_MACRO=caller)
-exten => 100,n,Set(__CONNECTED_LINE_CALLER_SEND_MACRO_ARGS=45,4)
-exten => 100,n,Dial(local/101 at test)
-exten => 100,n,Hangup
-
-exten => 101,1,NoOp
-exten => 101,n,Set(CONNECTEDLINE(name,i)="Company Name")
-exten => 101,n,Set(CONNECTEDLINE(name-pres,i)=allowed)
-exten => 101,n,Set(CONNECTEDLINE(num,i)=5551212)
-exten => 101,n,Set(CONNECTEDLINE(num-pres)=allowed)
-exten => 101,n,Answer
-exten => 101,n,Echo()
-
-[macro-caller]
-; ARG1 is the prefix to add.
-; ARG2 is the number of digits at the end to add the prefix to.
-; When the macro ends the CONNECTEDLINE data is passed to the
-; channel driver.
-exten => s,1,NoOp(Add prefix to connected line, macro edition)
-exten => s,n,GotoIf($[${CONNECTEDLINE(number)} != 5551212]?end)
-exten => s,n,UserEvent(CLStatus,status: caller connected line macro,arg1: ${ARG1},arg2: ${ARG2})
-exten => s,n,Set(NOPREFIX=${CONNECTEDLINE(number):-${ARG2}})
-exten => s,n,Set(CONNECTEDLINE(num,i)=${ARG1}${NOPREFIX})
-exten => s,(end),MacroExit
diff --git a/tests/connected_line/macro/run-test b/tests/connected_line/macro/run-test
deleted file mode 100755
index 611dde4..0000000
--- a/tests/connected_line/macro/run-test
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/env python
-'''
-Copyright (C) 2012, Digium, Inc.
-Kinsey Moore <kmoore at digium.com>
-
-This program is free software, distributed under the terms of
-the GNU General Public License Version 2.
-'''
-
-import sys
-import logging
-
-sys.path.append("lib/python")
-from asterisk.test_case import SimpleTestCase
-from twisted.internet import reactor
-
-LOGGER = logging.getLogger(__name__)
-
-class ConnectedLineTest(SimpleTestCase):
-    def verify_event(self, event):
-        if event['userevent'] != 'CLStatus':
-            return False
-
-        if event['arg1'] != '45':
-            return False
-
-        if event['arg2'] != '4':
-            return False
-
-        LOGGER.info("Got connected line event")
-        return True
-
-def main():
-    test = ConnectedLineTest()
-    test.start_asterisk()
-    reactor.run()
-    test.stop_asterisk()
-
-    if not test.passed:
-        return 1
-
-    return 0
-
-if __name__ == "__main__":
-    sys.exit(main() or 0)
-
diff --git a/tests/connected_line/macro/test-config.yaml b/tests/connected_line/macro/test-config.yaml
deleted file mode 100644
index 0f542c6..0000000
--- a/tests/connected_line/macro/test-config.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-testinfo:
-    summary: 'Test connected line macro execution.'
-    description: 'Ensures that the macro execution for connected line executes as expected and receives its arguments properly.  This verifies functional usage of the following variables: CONNECTED_LINE_CALLEE_SEND_MACRO, CONNECTED_LINE_CALLEE_SEND_MACRO_ARGS, CONNECTED_LINE_CALLER_SEND_MACRO, CONNECTED_LINE_CALLER_SEND_MACRO_ARGS'
-
-properties:
-    dependencies:
-        - python : 'twisted'
-        - python : 'starpy'
-        - asterisk: 'app_dial'
-        - asterisk: 'app_echo'
-        - asterisk: 'app_macro'
-        - asterisk: 'app_userevent'
-        - asterisk: 'func_callerid'
-    tags:
-        - connected_line
-        - macro
diff --git a/tests/connected_line/tests.yaml b/tests/connected_line/tests.yaml
index 3da1d12..74fe22d 100644
--- a/tests/connected_line/tests.yaml
+++ b/tests/connected_line/tests.yaml
@@ -1,5 +1,4 @@
 # Enter tests here in the order they should be considered for execution:
 tests:
-    - test: 'macro'
     - test: 'subroutine'
 
diff --git a/tests/redirecting/macro/configs/ast1/extensions.conf b/tests/redirecting/macro/configs/ast1/extensions.conf
deleted file mode 100644
index ff427e2..0000000
--- a/tests/redirecting/macro/configs/ast1/extensions.conf
+++ /dev/null
@@ -1,28 +0,0 @@
-[test]
-exten => 100,1,NoOp
-exten => 100,n,Set(__REDIRECTING_CALLER_SEND_MACRO=caller)
-exten => 100,n,Set(__REDIRECTING_CALLER_SEND_MACRO_ARGS=45,4)
-exten => 100,n,Dial(local/101 at test)
-exten => 100,n,Hangup
-
-exten => 101,1,NoOp
-exten => 101,n,Set(REDIRECTING(to-num,i)=2000)
-exten => 101,n,Set(REDIRECTING(to-num-pres)=allowed)
-exten => 101,n,Set(REDIRECTING(from-num,i)=1000)
-exten => 101,n,Set(REDIRECTING(from-num-pres,i)=allowed)
-exten => 101,n,Set(REDIRECTING(count,i)=$[${REDIRECTING(count)} + 1])
-exten => 101,n,Set(REDIRECTING(reason,i)=cfu)
-exten => 101,n,Answer
-exten => 101,n,Echo()
-
-[macro-caller]
-; ARG1 is the prefix to add.
-; ARG2 is the number of digits at the end to add the prefix to.
-; When the macro ends the REDIRECTING data is passed to the
-; channel driver.
-exten => s,1,NoOp(Add prefix to redirecting to-num, macro edition)
-exten => s,n,GotoIf($[${REDIRECTING(to-num)} != 2000]?end)
-exten => s,n,UserEvent(RStatus,status: caller redirecting macro,arg1: ${ARG1},arg2: ${ARG2})
-exten => s,n,Set(NOPREFIX=${REDIRECTING(to-num):-${ARG2}})
-exten => s,n,Set(REDIRECTING(to-num,i)=${ARG1}${NOPREFIX})
-exten => s,(end),MacroExit
diff --git a/tests/redirecting/macro/run-test b/tests/redirecting/macro/run-test
deleted file mode 100755
index c29c5b1..0000000
--- a/tests/redirecting/macro/run-test
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/env python
-'''
-Copyright (C) 2012, Digium, Inc.
-Kinsey Moore <kmoore at digium.com>
-
-This program is free software, distributed under the terms of
-the GNU General Public License Version 2.
-'''
-
-import sys
-import logging
-
-sys.path.append("lib/python")
-from asterisk.test_case import SimpleTestCase
-from twisted.internet import reactor
-
-LOGGER = logging.getLogger(__name__)
-
-class RedirectingTest(SimpleTestCase):
-    def verify_event(self, event):
-        if event['userevent'] != 'RStatus':
-            return False
-
-        if event['arg1'] != '45':
-            return False
-
-        if event['arg2'] != '4':
-            return False
-
-        LOGGER.info("Got redirecting event")
-        return True
-
-def main():
-    test = RedirectingTest()
-    test.start_asterisk()
-    reactor.run()
-    test.stop_asterisk()
-
-    if not test.passed:
-        return 1
-
-    return 0
-
-if __name__ == "__main__":
-    sys.exit(main() or 0)
-
diff --git a/tests/redirecting/macro/test-config.yaml b/tests/redirecting/macro/test-config.yaml
deleted file mode 100644
index 91d6af1..0000000
--- a/tests/redirecting/macro/test-config.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-testinfo:
-    summary: 'Test redirecting macro execution.'
-    description: 'Ensures that the macro execution for redirecting executes as expected and receives its arguments properly.  This verifies functional usage of the following variables: REDIRECTING_CALLER_SEND_MACRO, REDIRECTING_CALLER_SEND_MACRO_ARGS'
-
-properties:
-    dependencies:
-        - python : 'twisted'
-        - python : 'starpy'
-        - asterisk: 'app_dial'
-        - asterisk: 'app_echo'
-        - asterisk: 'app_macro'
-        - asterisk: 'app_userevent'
-        - asterisk: 'func_callerid'
-    tags:
-        - redirecting
-        - macro
diff --git a/tests/redirecting/tests.yaml b/tests/redirecting/tests.yaml
index bf4b498..b1da227 100644
--- a/tests/redirecting/tests.yaml
+++ b/tests/redirecting/tests.yaml
@@ -1,6 +1,5 @@
 # Enter tests here in the order they should be considered for execution:
 tests:
     - test: 'forwardername'
-    - test: 'macro'
     - test: 'subroutine'
 

-- 
To view, visit https://gerrit.asterisk.org/c/testsuite/+/19789
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Change-Id: I059a79f1c680267c68b4ecb98347ddcc48084420
Gerrit-Change-Number: 19789
Gerrit-PatchSet: 3
Gerrit-Owner: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: N A <asterisk at phreaknet.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20230126/5a6b3c70/attachment-0001.html>


More information about the asterisk-code-review mailing list