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

Friendly Automation asteriskteam at digium.com
Mon May 18 12:15:02 CDT 2020


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

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(-)

Approvals:
  Benjamin Keith Ford: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Friendly Automation: Approved for Submit



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/+/14425
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: testsuite
Gerrit-Branch: 17
Gerrit-Change-Id: Ia29031ff43925ddb3f40e1ce1e7243a4723b8f5c
Gerrit-Change-Number: 14425
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200518/204fa0cc/attachment.html>


More information about the asterisk-code-review mailing list