[Asterisk-code-review] rest_api: Extend create test to cover setting variables. (testsuite[16])

Joshua Colp asteriskteam at digium.com
Fri May 15 06:41:55 CDT 2020


Joshua Colp has uploaded this change for review. ( https://gerrit.asterisk.org/c/testsuite/+/14412 )


Change subject: rest_api: Extend create test to cover setting variables.
......................................................................

rest_api: Extend create test to cover setting variables.

The channel create call now accepts variables to be set
during channel creation. This change extends the create
nominal test to also ensure that variables get set.

ASTERISK-28896

Change-Id: Ia29031ff43925ddb3f40e1ce1e7243a4723b8f5c
---
M tests/rest_api/channels/create_dial_bridge/create/nominal/test-config.yaml
1 file changed, 8 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/12/14412/1

diff --git a/tests/rest_api/channels/create_dial_bridge/create/nominal/test-config.yaml b/tests/rest_api/channels/create_dial_bridge/create/nominal/test-config.yaml
index 22ceecb..bd17c00 100644
--- a/tests/rest_api/channels/create_dial_bridge/create/nominal/test-config.yaml
+++ b/tests/rest_api/channels/create_dial_bridge/create/nominal/test-config.yaml
@@ -1,8 +1,9 @@
 testinfo:
     summary: 'Test channels/create.'
     description: |
-        * Create channel 1 using channels/create with endpoint = Local/s at default
+        * Create channel 1 using channels/create with endpoint = Local/s at default and ALICE variable
         * Do a get to make sure it's actually there
+        * Do a variable get to make sure the ALICE variable is set on the channel
         * Delete the channel
         * Wait for ChannelHangupRequest
         * Do another get and test for 404
@@ -31,6 +32,7 @@
                     endpoint: 'Local/s at default'
                     app: 'testsuite'
                     channelId: 'channel1'
+                body: {'variables': {'ALICE': 'bob'}}
                 expect: 200
 
     -   ari-events:
@@ -44,6 +46,11 @@
             -   method: 'get'
                 uri: 'channels/channel1'
                 expect: 200
+            -   method: 'get'
+                uri: 'channels/channel1/variable'
+                params:
+                    variable: 'ALICE'
+                expect: 200
             -   method: 'delete'
                 uri: 'channels/channel1'
                 expect: 204

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

Gerrit-Project: testsuite
Gerrit-Branch: 16
Gerrit-Change-Id: Ia29031ff43925ddb3f40e1ce1e7243a4723b8f5c
Gerrit-Change-Number: 14412
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200515/ffdee97b/attachment.html>


More information about the asterisk-code-review mailing list