mirror of
https://github.com/OpenMTC/OpenMTC.git
synced 2024-12-19 04:58:01 +00:00
1052fd4a08
* Test debian stretch+python3 (#18) * changes starting with python3 explicit * removes python modules which are not available for python3 * exchanges fyzz query parsing with rdflib functionality * fixes interop tests * replaces reduce with for loop in nodb driver * simple python2 -> python3 conversions * adds changes for handling different string handling in python3 * test stretch building with travis * installing python-setuptools in docker * installing python-setuptools in docker * changing python2 to python3 in docker makefiles * changing python2 to python3 and some other test changes * push docker only in master branche * running version of openmtc * fix some port problems * porting path library completly now * restoring travis.yml * testing new travis.yml * add sudo * updating travis OS from trusty to xenial * upgrade pip before * show running docker logs * show more logs * for debugging * showlogs of docker after failure * testing new travis.yml * finish travis.yml * Adding roadmap (#26) * adding roadmap * adding a nicer view for some documents * creating contributions.md (#27) * travis only building on master branch (#25) * deleting some typo * another typo * adding a contributer * bump version to 1.3.0 * better link for contributions * Port and fix simple apps * add version tag
474 lines
20 KiB
YAML
474 lines
20 KiB
YAML
---
|
|
- config:
|
|
- testset: "Openmtc pyresttests"
|
|
|
|
###############################################################################
|
|
# ResourceType: CSEBASE
|
|
###############################################################################
|
|
- test:
|
|
- group: "Openmtc Test 8.1.1"
|
|
- name: "CSEBase Retrieve on Mca"
|
|
- url: "/onem2m"
|
|
- method: "GET" #Retrieve
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a'}
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2000'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: {jsonpath_mini: 'm2m:cb.ty', comparator: 'eq', expected: 5}
|
|
|
|
###############################################################################
|
|
# ResourceType: RemoteCSE
|
|
###############################################################################
|
|
- test:
|
|
- group: "Openmtc Test 8.1.2"
|
|
- name: "RemoteCSE Create"
|
|
- url: "/onem2m/"
|
|
- method: "POST" #Create
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a',
|
|
Content-Type: application/vnd.onem2m-res+json}
|
|
- body: '{"m2m:csr": {"csi":"/mn-cse-1", "cb":"onem2m", "rr":true, "cst":2, "rn":"mn-cse-1"}}' #pc
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2001'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: {jsonpath_mini: 'm2m:csr.ty', comparator: 'eq', expected: 16}
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.2"
|
|
- name: "remoteCSE Retrieve"
|
|
- url: "/onem2m/mn-cse-1"
|
|
- method: "GET" #Retrieve
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a'}
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2000'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: {jsonpath_mini: 'm2m:csr.ty', comparator: 'eq', expected: 16}
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.2"
|
|
- name: "RemoteCSE Update"
|
|
- url: "/onem2m/mn-cse-1"
|
|
- method: "PUT" #Update
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a',
|
|
Content-Type: application/vnd.onem2m-res+json}
|
|
- body: '{"m2m:csr": {"rr":false}}' #pc
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2004'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: {jsonpath_mini: 'm2m:csr.ty', comparator: 'eq', expected: 16}
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.2"
|
|
- name: "remoteCSE Delete"
|
|
- url: "/onem2m/mn-cse-1"
|
|
- method: "DELETE" #Delete
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a'}
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2002'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: [raw_body: "", expected: ""]
|
|
|
|
###############################################################################
|
|
# ResourceType: AE
|
|
###############################################################################
|
|
- test:
|
|
- group: "Openmtc Test 8.1.3"
|
|
- name: "AE Create"
|
|
- url: "/onem2m/"
|
|
- method: "POST" #Create
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a',
|
|
Content-Type: application/vnd.onem2m-res+json}
|
|
- body: '{"m2m:ae": {"api":"/myAE","rr":true,"rn":"myAE"}}' #pc
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2001'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: {jsonpath_mini: 'm2m:ae.ty', comparator: 'eq', expected: 2}
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.3"
|
|
- name: "AE Retrieve"
|
|
- url: "/onem2m/myAE"
|
|
- method: "GET" #Retrieve
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a'}
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2000'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: {jsonpath_mini: 'm2m:ae.ty', comparator: 'eq', expected: 2}
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.3"
|
|
- name: "AE Update"
|
|
- url: "/onem2m/myAE"
|
|
- method: "PUT" #Update
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a',
|
|
Content-Type: application/vnd.onem2m-res+json}
|
|
- body: '{"m2m:csr": {"rr":false}}' #pc
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2004'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: {jsonpath_mini: 'm2m:ae.ty', comparator: 'eq', expected: 2}
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.3"
|
|
- name: "AE Delete"
|
|
- url: "/onem2m/myAE"
|
|
- method: "DELETE" #Delete
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a'}
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2002'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: [raw_body: "", expected: ""]
|
|
|
|
###############################################################################
|
|
# ResourceType: Container
|
|
###############################################################################
|
|
- test:
|
|
- group: "Openmtc Test 8.1.4"
|
|
- name: "AE Create"
|
|
- url: "/onem2m/"
|
|
- method: "POST" #Create
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a',
|
|
Content-Type: application/vnd.onem2m-res+json}
|
|
- body: '{"m2m:ae": {"api":"/myAE","rr":true,"rn":"myAE"}}' #pc
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2001'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: {jsonpath_mini: 'm2m:ae.ty', comparator: 'eq', expected: 2}
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.4"
|
|
- name: "Container Create"
|
|
- url: "/onem2m/myAE"
|
|
- method: "POST" #Create
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a',
|
|
Content-Type: application/vnd.onem2m-res+json}
|
|
- body: '{"m2m:cnt": {"rn":"myContainer"}}' #pc, , "li" = "Container1"
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2001'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: {jsonpath_mini: 'm2m:cnt.ty', comparator: 'eq', expected: 3}
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.4"
|
|
- name: "Container Retrieve"
|
|
- url: "/onem2m/myAE/myContainer"
|
|
- method: "GET" #Retrieve
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a'}
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2000'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: {jsonpath_mini: 'm2m:cnt.ty', comparator: 'eq', expected: 3}
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.4"
|
|
- name: "Container Update"
|
|
- url: "/onem2m/myAE/myContainer"
|
|
- method: "PUT" #Update
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a',
|
|
Content-Type: application/vnd.onem2m-res+json}
|
|
- body: '{"m2m:cnt": {"mni": 4}}' #pc
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2004'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: {jsonpath_mini: 'm2m:cnt.ty', comparator: 'eq', expected: 3}
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.4"
|
|
- name: "Container Delete"
|
|
- url: "/onem2m/myAE/myContainer"
|
|
- method: "DELETE" #Delete
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a'}
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2002'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: [raw_body: "", expected: ""]
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.4"
|
|
- name: "AE Delete"
|
|
- url: "/onem2m/myAE"
|
|
- method: "DELETE" #Delete
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a'}
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2002'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: [raw_body: "", expected: ""]
|
|
|
|
###############################################################################
|
|
# ResourceType: ContentInstance
|
|
###############################################################################
|
|
- test:
|
|
- group: "Openmtc Test 8.1.4"
|
|
- name: "AE Create"
|
|
- url: "/onem2m/"
|
|
- method: "POST" #Create
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a',
|
|
Content-Type: application/vnd.onem2m-res+json}
|
|
- body: '{"m2m:ae": {"api":"/myAE","rr":true,"rn":"myAE"}}' #pc
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2001'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: {jsonpath_mini: 'm2m:ae.ty', comparator: 'eq', expected: 2}
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.4"
|
|
- name: "Container Create"
|
|
- url: "/onem2m/myAE"
|
|
- method: "POST" #Create
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a',
|
|
Content-Type: application/vnd.onem2m-res+json}
|
|
- body: '{"m2m:cnt": {"rn":"myContainer"}}' #pc, , "li" = "Container1"
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2001'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: {jsonpath_mini: 'm2m:cnt.ty', comparator: 'eq', expected: 3}
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.5"
|
|
- name: "ContentInstance Create"
|
|
- url: "/onem2m/myAE/myContainer"
|
|
- method: "POST" #Create
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a',
|
|
Content-Type: application/vnd.onem2m-res+json}
|
|
- body: '{"m2m:cin": {"con":"Type" , "rn":"Testcontent", "cnf": "text/plain:0" }}' #pc, , "li" = "Container1"
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2001'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: {jsonpath_mini: 'm2m:cin.ty', comparator: 'eq', expected: 4}
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.5"
|
|
- name: "Container Retrieve"
|
|
- url: "/onem2m/myAE/myContainer"
|
|
- method: "GET" #Retrieve
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a'}
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2000'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: {jsonpath_mini: 'm2m:cnt.cni', comparator: 'eq', expected: 1}
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.5"
|
|
- name: "ContentInstance Retrieve"
|
|
- url: "/onem2m/myAE/myContainer/Testcontent"
|
|
- method: "GET" #Retrieve
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a'}
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2000'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: {jsonpath_mini: 'm2m:cin.ty', comparator: 'eq', expected: 4}
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.5"
|
|
- name: "ContentInstance Delete"
|
|
- url: "/onem2m/myAE/myContainer/Testcontent"
|
|
- method: "DELETE" #Delete
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a'}
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2002'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: [raw_body: "", expected: ""]
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.5"
|
|
- name: "ContentInstance Create"
|
|
- url: "/onem2m/myAE/myContainer"
|
|
- method: "POST" #Create
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a',
|
|
Content-Type: application/vnd.onem2m-res+json}
|
|
- body: '{"m2m:cin": {"con":"Type" , "rn":"Testcontent", "cnf": "text/plain:0" }}' #pc, , "li" = "Container1"
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2001'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: {jsonpath_mini: 'm2m:cin.ty', comparator: 'eq', expected: 4}
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.5"
|
|
- name: "latest ContentInstance Delete"
|
|
- url: "/onem2m/myAE/myContainer/la"
|
|
- method: "DELETE" #Delete
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a'}
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2002'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: [raw_body: "", expected: ""]
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.5"
|
|
- name: "ContentInstance Create"
|
|
- url: "/onem2m/myAE/myContainer"
|
|
- method: "POST" #Create
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a',
|
|
Content-Type: application/vnd.onem2m-res+json}
|
|
- body: '{"m2m:cin": {"con":"Type" , "rn":"Testcontent", "cnf": "text/plain:0" }}' #pc, , "li" = "Container1"
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2001'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: {jsonpath_mini: 'm2m:cin.ty', comparator: 'eq', expected: 4}
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.5"
|
|
- name: "oldest ContentInstance Delete"
|
|
- url: "/onem2m/myAE/myContainer/ol"
|
|
- method: "DELETE" #Delete
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a'}
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2002'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: [raw_body: "", expected: ""]
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.5"
|
|
- name: "ContentInstance Create"
|
|
- url: "/onem2m/myAE/myContainer"
|
|
- method: "POST" #Create
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a',
|
|
Content-Type: application/vnd.onem2m-res+json}
|
|
- body: '{"m2m:cin": {"con":"Type" , "rn":"Testcontent", "cnf": "text/plain:0" }}' #pc, , "li" = "Container1"
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2001'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: {jsonpath_mini: 'm2m:cin.ty', comparator: 'eq', expected: 4}
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.5"
|
|
- name: "latest ContentInstance Retrieve"
|
|
- url: "/onem2m/myAE/myContainer/la"
|
|
- method: "GET" #Retrieve
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a'}
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2000'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: {jsonpath_mini: 'm2m:cin.ty', comparator: 'eq', expected: 4}
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.5"
|
|
- name: "oldest ContentInstance Retrieve"
|
|
- url: "/onem2m/myAE/myContainer/ol"
|
|
- method: "GET" #Retrieve
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a'}
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2000'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: {jsonpath_mini: 'm2m:cin.ty', comparator: 'eq', expected: 4}
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.5"
|
|
- name: "Container Delete"
|
|
- url: "/onem2m/myAE/myContainer"
|
|
- method: "DELETE" #Delete
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a'}
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2002'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: [raw_body: "", expected: ""]
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.5"
|
|
- name: "AE Delete"
|
|
- url: "/onem2m/myAE"
|
|
- method: "DELETE" #Delete
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a'}
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2002'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
- compare: [raw_body: "", expected: ""]
|
|
|
|
###############################################################################
|
|
# Discovery
|
|
###############################################################################
|
|
- test:
|
|
- group: "Openmtc Test 8.1.6"
|
|
- name: "Discovery all resources"
|
|
- url: "/onem2m?fu=1"
|
|
- method: "GET" #Retrieve
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a'}
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2000'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.6"
|
|
- name: "Discovery with filter criteria"
|
|
- url: "/onem2m?fu=1&lbl=key1"
|
|
- method: "GET" #Retrieve
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a'}
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2000'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.6"
|
|
- name: "Discovery with limit filter criteria"
|
|
- url: "/onem2m?fu=1&lim=2"
|
|
- method: "GET" #Retrieve
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a'}
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2000'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
|
|
- test:
|
|
- group: "Openmtc Test 8.1.6"
|
|
- name: "Discovery with mulriple filter criteria"
|
|
- url: "/onem2m?fu=1&lbl=key1&lbl=key2&lim=1"
|
|
- method: "GET" #Retrieve
|
|
- headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a'}
|
|
- validators:
|
|
- compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2000'}
|
|
- compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
- compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
|
|
#- test:
|
|
# - group: "Openmtc Test 8.1.6"
|
|
# - name: "Discovery with level filter criteria"
|
|
# - url: "/onem2m?fu=1&lvl=2"
|
|
# - method: "GET" #Retrieve
|
|
# - headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a'}
|
|
# - validators:
|
|
# - compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2000'}
|
|
# - compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
# - compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|
|
|
|
#- test:
|
|
# - group: "Openmtc Test 8.1.6"
|
|
# - name: "Discovery with offset filter criteria"
|
|
# - url: "/onem2m?fu=1&ofst=1"
|
|
# - method: "GET" #Retrieve
|
|
# - headers: {'x-m2m-origin':'CAE0', 'x-m2m-ri': 'foobar', 'x-m2m-rvi': '2a'}
|
|
# - validators:
|
|
# - compare: {header: x-m2m-rsc, comparator: 'eq', expected: '2000'}
|
|
# - compare: {header: x-m2m-ri, comparator: 'eq', expected: 'foobar'}
|
|
# - compare: {header: x-m2m-rvi, comparator: 'eq', expected: '2a'}
|