FIWARE / context.Orion-LD

Context Broker and CEF building block for context data management which supports both the NGSI-LD and the NGSI-v2 APIs
https://www.etsi.org/deliver/etsi_gs/CIM/001_099/009/01.06.01_60/gs_CIM009v010601p.pdf
GNU Affero General Public License v3.0
50 stars 43 forks source link

034_01 - Check that you can update a context source registration by id (034_01_02 Update a context source registration to never expire) #1516

Closed lafrigolet closed 11 months ago

lafrigolet commented 11 months ago

TP.NGSI-LD.ContextSource.Registration.UpdateContextSourceRegistration.034_01 :: 034_01_02 Update a context source registration to never expire)

Context Broker Information:

Version: develop commit 238ac6c353325f8d486ef79ea137df20df12f277 Launch command: orionld -fg

034_01_02 Update a context source registration to never expire | FAIL |

Setup failed: HTTP status code comparison failed with (expected, actual) ->: 201 != 501

Also teardown failed: Several failures occurred:

1) HTTPError: 404 Client Error: Not Found for url: http://localhost:8080/ngsi-ld/v1/csourceRegistrations/urn:ngsi-ld:Registration:4697736698911875

2) AttributeError: 'NoneType' object has no attribute 'request'

Test Request/Response Flow

Create Context Source Registration

Request

POST http://127.0.0.1:1026/ngsi-ld/v1/csourceRegistrations
Host: 127.0.0.1:1026
User-Agent: python-requests/2.31.0
Accept-Encoding: gzip, deflate, br, zstd
Accept: */*
Connection: keep-alive
Content-Type: application/ld+json
Content-Length: 805

{"id": "urn:ngsi-ld:Registration:4697736698911875", "type": "ContextSourceRegistration", "information": [{"entities": [{"id": "urn:ngsi-ld:Registration:4697736698911875", "type": "Vehicle"}], "propertyNames": ["brandName", "speed"], "relationshipNames": ["isParked"]}, {"entities": [{"idPattern": ".*downtown$", "type": "OffStreetParking"}, {"idPattern": ".*47$", "type": "OffStreetParking"}], "propertyNames": ["availableSpotNumber", "totalSpotNumber"], "relationshipNames": ["isNextToBuilding"]}], "endpoint": "http://my.csource.org:1026", "location": {"type": "Polygon", "coordinates": [[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]]]}, "@context": ["https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld"]}

Response

HTTP/1.1 501 Not Implemented
Date: Mon, 18 Dec 2023 14:33:29 GMT
Content-Type: application/json
Content-Length: 160

{"type":"https://uri.etsi.org/ngsi-ld/errors/OperationNotSupported","title":"More than one item in Registration::information vector","detail":"Not Implemented"}

Request

DELETE http://127.0.0.1:1026/ngsi-ld/v1/csourceRegistrations/urn:ngsi-ld:Registration:4697736698911875
Host: 127.0.0.1:1026
User-Agent: python-requests/2.31.0
Accept-Encoding: gzip, deflate, br, zstd
Accept: */*
Connection: keep-alive
Content-Length: 0

Response

HTTP/1.1 404 Not Found
Date: Mon, 18 Dec 2023 14:33:29 GMT
Content-Type: application/json
Content-Length: 164

{"type":"https://uri.etsi.org/ngsi-ld/errors/ResourceNotFound","title":"Context Source Registration not found","detail":"urn:ngsi-ld:Registration:4697736698911875"}