* the endpoint is temporarily removed from testing until the ngcp_type check is introduced for these tests Change-Id: I8d5c3c1e625ce68469061f111931011664969c58mr11.0
parent
27c3b7dc3b
commit
f3eafccd95
@ -1,202 +0,0 @@
|
|||||||
---
|
|
||||||
#check options
|
|
||||||
-
|
|
||||||
name: check OPTIONS for headerrulesets
|
|
||||||
type: item
|
|
||||||
method: OPTIONS
|
|
||||||
path: /api/headerrulesets/
|
|
||||||
conditions:
|
|
||||||
is:
|
|
||||||
code: 200
|
|
||||||
header:
|
|
||||||
Accept-Post: application/hal+json; profile=http://purl.org/sipwise/ngcp-api/#rel-headerrulesets
|
|
||||||
ok:
|
|
||||||
options:
|
|
||||||
- GET
|
|
||||||
- HEAD
|
|
||||||
- OPTIONS
|
|
||||||
- POST
|
|
||||||
|
|
||||||
#create headerrulesets
|
|
||||||
-
|
|
||||||
name: create headerrulesets
|
|
||||||
type: item
|
|
||||||
method: POST
|
|
||||||
path: '/api/headerrulesets/'
|
|
||||||
header:
|
|
||||||
Content-Type: application/json
|
|
||||||
content:
|
|
||||||
reseller_id: 1
|
|
||||||
name: 'api_test_1_${unique_id}'
|
|
||||||
description: 'api_test rule set description'
|
|
||||||
retain:
|
|
||||||
headerrulesets_path1: header.location
|
|
||||||
conditions:
|
|
||||||
is:
|
|
||||||
code: 201
|
|
||||||
|
|
||||||
#create headerrulesets
|
|
||||||
-
|
|
||||||
name: create headerrulesets
|
|
||||||
type: item
|
|
||||||
method: POST
|
|
||||||
path: '/api/headerrulesets/'
|
|
||||||
header:
|
|
||||||
Content-Type: application/json
|
|
||||||
content:
|
|
||||||
reseller_id: 1
|
|
||||||
name: 'api_test_2_${unique_id}'
|
|
||||||
description: 'api_test rule set description'
|
|
||||||
retain:
|
|
||||||
headerrulesets_path2: header.location
|
|
||||||
conditions:
|
|
||||||
is:
|
|
||||||
code: 201
|
|
||||||
|
|
||||||
#create headerrulesets
|
|
||||||
-
|
|
||||||
name: create headerrulesets
|
|
||||||
type: item
|
|
||||||
method: POST
|
|
||||||
path: '/api/headerrulesets/'
|
|
||||||
header:
|
|
||||||
Content-Type: application/json
|
|
||||||
content:
|
|
||||||
reseller_id: 1
|
|
||||||
name: 'api_test_3_${unique_id}'
|
|
||||||
description: 'api_test rule set description'
|
|
||||||
retain:
|
|
||||||
headerrulesets_path3: header.location
|
|
||||||
conditions:
|
|
||||||
is:
|
|
||||||
code: 201
|
|
||||||
|
|
||||||
#verify pagination
|
|
||||||
-
|
|
||||||
name: verify pagination
|
|
||||||
type: pagination
|
|
||||||
method: GET
|
|
||||||
path: '/api/headerrulesets/?page=1&rows=2'
|
|
||||||
retain:
|
|
||||||
collection: body
|
|
||||||
conditions:
|
|
||||||
is:
|
|
||||||
code: 200
|
|
||||||
|
|
||||||
#check options on item
|
|
||||||
-
|
|
||||||
name: check OPTIONS for headerrulesets item
|
|
||||||
type: item
|
|
||||||
method: OPTIONS
|
|
||||||
path: '/${headerrulesets_path3}'
|
|
||||||
conditions:
|
|
||||||
is:
|
|
||||||
code: 200
|
|
||||||
ok:
|
|
||||||
options:
|
|
||||||
- GET
|
|
||||||
- HEAD
|
|
||||||
- OPTIONS
|
|
||||||
- PUT
|
|
||||||
- PATCH
|
|
||||||
- DELETE
|
|
||||||
|
|
||||||
#get headerrulesets
|
|
||||||
-
|
|
||||||
name: GET headerrulesets
|
|
||||||
type: item
|
|
||||||
method: GET
|
|
||||||
path: '/${headerrulesets_path3}'
|
|
||||||
retain:
|
|
||||||
headerrulesets: body
|
|
||||||
perl_code: !!perl/code |
|
|
||||||
{
|
|
||||||
my ($retained) = @_;
|
|
||||||
delete $retained->{headerrulesets}->{_links};
|
|
||||||
delete $retained->{headerrulesets}->{_embedded};
|
|
||||||
}
|
|
||||||
conditions:
|
|
||||||
is:
|
|
||||||
code: 200
|
|
||||||
|
|
||||||
#put headerrulesets
|
|
||||||
-
|
|
||||||
name: PUT headerrulesets
|
|
||||||
type: item
|
|
||||||
method: PUT
|
|
||||||
path: '/${headerrulesets_path3}'
|
|
||||||
header:
|
|
||||||
Content-Type: application/json
|
|
||||||
Prefer: return=representation
|
|
||||||
content: '${headerrulesets}'
|
|
||||||
conditions:
|
|
||||||
is:
|
|
||||||
code: 200
|
|
||||||
|
|
||||||
#get headerrulesets
|
|
||||||
-
|
|
||||||
name: GET headerrulesets
|
|
||||||
type: item
|
|
||||||
method: GET
|
|
||||||
path: '/${headerrulesets_path3}'
|
|
||||||
retain:
|
|
||||||
new_headerrulesets: body
|
|
||||||
perl_code: !!perl/code |
|
|
||||||
{
|
|
||||||
my ($retained) = @_;
|
|
||||||
delete $retained->{new_headerrulesets}->{_links};
|
|
||||||
delete $retained->{new_headerrulesets}->{_embedded};
|
|
||||||
}
|
|
||||||
conditions:
|
|
||||||
is:
|
|
||||||
code: 200
|
|
||||||
is_deeply:
|
|
||||||
'${headerrulesets}': ${new_headerrulesets}
|
|
||||||
|
|
||||||
#create headerrulesets without reseller id
|
|
||||||
-
|
|
||||||
name: create headerrulesets without reseller id
|
|
||||||
type: item
|
|
||||||
method: POST
|
|
||||||
path: '/api/headerrulesets/'
|
|
||||||
header:
|
|
||||||
Content-Type: application/json
|
|
||||||
content:
|
|
||||||
name: 'api_test_4_${unique_id}'
|
|
||||||
description: 'api_test rule set description'
|
|
||||||
conditions:
|
|
||||||
is:
|
|
||||||
code: 422
|
|
||||||
body.code: 422
|
|
||||||
like:
|
|
||||||
body.message: field='reseller_id'
|
|
||||||
|
|
||||||
#DELETE headerrulesets
|
|
||||||
-
|
|
||||||
name: DELETE headerrulesets
|
|
||||||
type: item
|
|
||||||
method: DELETE
|
|
||||||
path: '/${headerrulesets_path1}'
|
|
||||||
conditions:
|
|
||||||
is:
|
|
||||||
code: 204
|
|
||||||
|
|
||||||
#DELETE headerrulesets
|
|
||||||
-
|
|
||||||
name: DELETE headerrulesets
|
|
||||||
type: item
|
|
||||||
method: DELETE
|
|
||||||
path: '/${headerrulesets_path2}'
|
|
||||||
conditions:
|
|
||||||
is:
|
|
||||||
code: 204
|
|
||||||
|
|
||||||
#DELETE headerrulesets
|
|
||||||
-
|
|
||||||
name: DELETE headerrulesets
|
|
||||||
type: item
|
|
||||||
method: DELETE
|
|
||||||
path: '/${headerrulesets_path3}'
|
|
||||||
conditions:
|
|
||||||
is:
|
|
||||||
code: 204
|
|
Loading…
Reference in new issue