Skip to content

Commit c8f11b1

Browse files
Cloud Event notification
Cloud Event notification: #283
1 parent 6b3da72 commit c8f11b1

File tree

1 file changed

+86
-0
lines changed

1 file changed

+86
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
Feature: CAMARA Traffic Influence API, vWIP - Operation traffic-influeces
2+
# Input to be provided by the implementation to the tester
3+
#
4+
# Implementation indications:
5+
#
6+
# Testing assets:
7+
# * A device object which the optimal routing must be activated
8+
#
9+
Background: Common traffic-influences setup
10+
Given the path "/traffic-influences"
11+
And the header "Content-Type" is set to "application/json"
12+
And the header "Authorization" is set to a valid access token
13+
And the header "x-correlator" is set to a UUID value
14+
And the request body is set by default to a request body compliant with the schema
15+
16+
# Happy path scenarios
17+
18+
# Mandatory valid paramenters
19+
@TI_Resource_LCM_Mandatory_Parameters_Valid
20+
Scenario: Manage Traffic Influence (TI) Resource with mandatory parameters
21+
When creating a new TI Resource, with POST, with mandatory parameters ("$.apiConsumerId", "$.applicationId")
22+
Then it should be created a new TI Resource and the optimal routing will be activated for any user on any location
23+
And Response Code is 201
24+
And response contains the TI Resource with the resource identifier ("$.trafficInfluenceID") valorised with a unique value, the status of the request ("$.state=ordered") and the previously used parameters valorised as in the POST request
25+
When asking for a previously created TI Resource, with GET, with the parameter "$.trafficInfluenceID" valorised with the reponse of the previous POST
26+
Then Response code is 200
27+
And response contains a TI Resource with a potentially updated status ("$.state") reporting the current status of the traffic influece configuration (ordered, created, active, error, deleted)
28+
When deleting an existing TI Resource, with DELETE, with the parameter "$.trafficInfluenceID" valorised with the reponse of the previous POST
29+
Then Response Code is 202 and the response message is Accepted meaning that the resource deletion is accepted and in progress. The satus update can be retrived with the GET method on that TI Resource. The final value of the parameter "state" is "deleted".
30+
31+
# Optional valid paramenters
32+
@TI_Resource_LCM_Optional_Parameters_Valid
33+
Scenario: Manage Traffic Influence (TI) Resource with also optional parameters
34+
Given the usage of the Traffic Influece API URL
35+
When creating a new TI Resource, with POST, with mandatory parameters ("$.apiConsumerId", "$.applicationId") and any other optional parameters (e.g. "$.instanceId", "$.zone" etc.)
36+
Then it should be created a new TI Resource and the optimal routing will be activated according to the optional paramters specified (e.g. only in a specific zone or for a specific user)
37+
And Response Code is 201
38+
And response contains the TI Resource with the resource identifier ("$.trafficInfluenceID"), the status of the request ("$.state=ordered") and the previously used parameters valorised as in the POST request
39+
When asking for a previously created TI Resource, with GET, with the parameter "$.trafficInfluenceID" valorised with the reponse of the previous POST
40+
Then Response code is 200
41+
And response contains a TI Resource with the a potentially updated status ("$.state") reporting the current status of the traffic influece configuration (ordered, created, active, error, deleted)
42+
When updating an existing TI Resource, with, PATCH, with the parameter "$.trafficInfluenceID" valorised with the reponse of the previous POST and with some of the optional parameters updated (the madatory parameters can not be updated) and, potentially, some of the optional parameters still having the same value as before
43+
Then the TI Resource is modified
44+
And Response Code is 200
45+
And response contains the TI Resource with the resource identifier ("$.trafficInfluenceID"), the status of the request ("$.state=ordered") and the previously used paramters valorised as in the PATCH request
46+
When deleting an existing TI Resource, with DELETE, with the parameter "$.trafficInfluenceID" valorised with the reponse of the previous POST
47+
Then Response Code is 202 and the responce message is Accepted meaning that the resource deletion is accepted and in progress. The satus update can be retrived with the GET method on that TI Resource. The final value of the parameter "$.state" is "deleted".
48+
49+
# Invalid paramenters
50+
@TI_Resource_LCM_Invalid_Parameters
51+
Scenario: Manage Traffic Influence Resource with invalid paramters
52+
Given the usage of the Traffic Influence API URL
53+
When creating a new TI Resource, with POST, with invalid parameters (mandatory or optionals)
54+
Then no new TI Resource is created and no optimal routing will be activated
55+
And Response Code is 400
56+
When asking for a previously created TI Resource, with GET, with an invalid parameter "$.trafficInfluenceID"
57+
Then Response code is 404
58+
When updating an existing TI Resource, with, PATCH, with invalid an invalid parameter "$.trafficInfluenceID"
59+
Then Response Code is 404
60+
When updating an existing TI Resource, with, PATCH, with invalid parameters (with the exclusion of "$.trafficInfluenceID")
61+
Then Response Code is 400
62+
When deleting an existing TI Resource, with DELETE, with an invalid parameter "$.trafficInfluenceID"
63+
Then Response Code is 400
64+
65+
# Mandatory paramenter are valid but not all provided
66+
@TI_Incomplete_Parameters_TI_Creation
67+
Scenario: Creation of new TI Resource without all the mandatory parameters
68+
Given the usage of the Traffic Influece API URL
69+
When creating a new TI Resource, with POST, without all the mandatory parameters ("$.apiConsumerId", "$.applicationId")
70+
Then no new TI Resource is created and no optimal routing will be activated
71+
And Response Code is 400
72+
73+
# User Mobility
74+
@TI_Resource_LCM_Modify_Resource_User_Mobility
75+
Scenario: Modify an already created Traffic Influence (TI) Resource when a Device moves to another geographical area
76+
Given the usage of the Traffic Influece API URL
77+
When modifiyng a existing TI Resource, with PATCH, with mandatory parameters ("$.apiConsumerId", "$.applicationId"), with the identifier for the existing resource ("$.trafficInfluenceID") and other optional, editable, parameters (e.g. "$.instanceId", "$.zone" etc.) to identify a new Edge Application instance closer to the Device that has moved in a new geographical area.
78+
Then it should be modified the TI Resource and the new optimal routing will be activated according to the optional paramters specified (e.g. in a new zone)
79+
And Response Code is 201
80+
And response contains the original TI Resource with the resource identifier ("$.trafficInfluenceID") unmodified, the status of the request ("$.state=ordered"), the new parameters valorised as in the PATCH request and the other original paramenters unmodified.
81+
82+
# Error path scenarios
83+
TBD
84+
85+
86+

0 commit comments

Comments
 (0)