-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdedicated-network-accesses.feature
More file actions
130 lines (115 loc) · 7.51 KB
/
Copy pathdedicated-network-accesses.feature
File metadata and controls
130 lines (115 loc) · 7.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
Feature: CAMARA Dedicated Network API, vwip - Network Accesses API Operations
# Input to be provided by the implementation to the tester
#
# Implementation indications:
# * apiRoot: API root of the server URL
#
# Testing assets:
# * At least one existing dedicated network
# * Valid device identifier (phoneNumber or networkAccessIdentifier)
# * At least one existing network access
#
# References to OAS spec schemas refer to schemas specified in dedicated-network-accesses.yaml
Background: Common accesses setup
Given an environment at "apiRoot"
And the header "Authorization" is set to a valid access token
And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator"
# Success scenarios for GET /accesses
@dedicated_network_accesses_listNetworkAccesses_01_success_all
Scenario: List all network accesses
Given the resource "/dedicated-network-accesses/vwip/accesses"
When the request "listNetworkAccesses" is sent
Then the response status code is 200
And the response header "Content-Type" is "application/json"
And the response header "x-correlator" has the same value as the request header "x-correlator"
And the response body is an array where each item complies with the OAS schema at "/components/schemas/AccessInfo"
@dedicated_network_accesses_listNetworkAccesses_02_success_filtered_by_network
Scenario: List network accesses filtered by network ID
Given an existing dedicated network
And the resource "/dedicated-network-accesses/vwip/accesses"
And the query parameter "networkId" is set to the ID of the existing network
When the request "listNetworkAccesses" is sent
Then the response status code is 200
And the response header "Content-Type" is "application/json"
And the response header "x-correlator" has the same value as the request header "x-correlator"
And the response body is an array where each item complies with the OAS schema at "/components/schemas/AccessInfo"
And each item in the response array has property "networkId" equal to the query parameter "networkId"
@dedicated_network_accesses_listNetworkAccesses_03_success_filtered_by_device
Scenario: List network accesses filtered by device
Given a valid device identifier
And the resource "/dedicated-network-accesses/vwip/accesses"
And the header "x-device" is set to a RFC 8941 structured field value representing the Device schema (#/components/schemas/Device) (e.g., 'phonenumber="+123456789"')
When the request "listNetworkAccesses" is sent
Then the response status code is 200
And the response header "Content-Type" is "application/json"
And the response header "x-correlator" has the same value as the request header "x-correlator"
And the response body is an array where each item complies with the OAS schema at "/components/schemas/AccessInfo"
#And the response property "$.device" contains the same device identifier information as provided in the "x-device" header
And each item in the response array has property "device" containing the device identifier information that corresponds to the device specified in the "x-device" header
# Success scenarios for POST /accesses
@dedicated_network_accesses_createNetworkAccess_01_success
Scenario: Create a network access with valid parameters
Given an existing dedicated network
And the resource "/dedicated-network-accesses/vwip/accesses"
And the header "Content-Type" is set to "application/json"
And the request body is set to a request body compliant with the schema at "/components/schemas/CreateNetworkAccess"
And the request body property "$.networkId" is set to the ID of the existing network
And the request body property "$.devices" array contains one or more (up to 100) valid device objects
When the request "createNetworkAccess" is sent
Then the response status code is 201
And the response header "Content-Type" is "application/json"
And the response header "x-correlator" has the same value as the request header "x-correlator"
And the response header "Location" exists and contains a URL with the created access ID
And the response body complies with the OAS schema at "/components/schemas/AccessInfo"
And the response property "$.networkId" has the same value as in the request body
And the response property "$.id" exists and is a valid UUID
And the response property "$.stats" exists and complies with the OAS schema at "/components/schemas/AccessStats"
# Success scenarios for GET /accesses/{accessId}
@dedicated_network_accesses_readNetworkAccess_01_success
Scenario: Get details of a specific network access
Given an existing dedicated network
And an existing network access
And the resource "/dedicated-network-accesses/vwip/accesses/{accessId}"
And the path parameter "accessId" is set to the ID of the existing access
When the request "readNetworkAccess" is sent
Then the response status code is 200
And the response header "Content-Type" is "application/json"
And the response header "x-correlator" has the same value as the request header "x-correlator"
And the response body complies with the OAS schema at "/components/schemas/AccessInfo"
And the response property "$.id" is equal to the path parameter "accessId"
And the response property "$.stats" complies with the OAS schema at "/components/schemas/AccessStats"
# Success scenarios for DELETE /accesses/{accessId}
@dedicated_network_accesses_deleteNetworkAccess_01_success
Scenario: Delete a network access
Given an existing dedicated network
And an existing network access
And the resource "/dedicated-network-accesses/vwip/accesses/{accessId}"
And the path parameter "accessId" is set to the ID of the existing access
When the request "deleteNetworkAccess" is sent
Then the response status code is 204
And the response header "x-correlator" has the same value as the request header "x-correlator"
# Success scenarios for POST /devices/add
@dedicated_network_accesses_addNetworkaccess_01_success
Scenario: Add a device to an existing network access
Given an existing dedicated network
And an existing network access
And the resource "/dedicated-network-accesses/vwip/accesses/{accessId}/devices/add"
And the path parameter "accessId" is set to the ID of the existing access
And the header "Content-Type" is set to "application/json"
And the request body is set to a request body compliant with the schema at "/components/schemas/AddDevicesRequest"
And the request body array contains one or more (up to 100) valid device objects
When the request "addDevicesRequest" is sent
Then the response status code is 201
And the response body complies with the OAS schema at "/components/schemas/AddDevicessSuccess"
# Success scenarios for POST /devices/remove
@dedicated_network_accesses_removeNetworkaccess_01_success
Scenario: Remove a device to an existing network access
Given an existing dedicated network
And an existing network access
And the resource "/dedicated-network-accesses/vwip/accesses/{accessId}/devices/add"
And the path parameter "accessId" is set to the ID of the existing access
And the header "Content-Type" is set to "application/json"
And the request body is set to a request body compliant with the schema at "/components/schemas/RemoveDevicesRequest"
And the request body array contains one or more (up to 100) valid device objects
When the request "removeDevicesRequest" is sent
Then the response status code is 204