From c74bdc5e1301719de776af82e2c21d52f0e06be2 Mon Sep 17 00:00:00 2001 From: Alvaro Vega Date: Tue, 21 May 2024 17:19:30 +0200 Subject: [PATCH] update tests --- test/unit/ngsiv2/amqpBinding-test.js | 28 ++-------------------------- test/unit/ngsiv2/mqttBinding-test.js | 28 ++-------------------------- 2 files changed, 4 insertions(+), 52 deletions(-) diff --git a/test/unit/ngsiv2/amqpBinding-test.js b/test/unit/ngsiv2/amqpBinding-test.js index ae43f19a..b4a7746a 100644 --- a/test/unit/ngsiv2/amqpBinding-test.js +++ b/test/unit/ngsiv2/amqpBinding-test.js @@ -218,19 +218,7 @@ describe('AMQP Transport binding: measures', function () { contextBrokerMock .matchHeader('fiware-service', 'smartgondor') .matchHeader('fiware-servicepath', '/gardens') - .post( - '/v2/entities?options=upsert', - utils.readExampleFile('./test/unit/ngsiv2/contextRequests/singleMeasure.json') - ) - .reply(204); - - contextBrokerMock - .matchHeader('fiware-service', 'smartgondor') - .matchHeader('fiware-servicepath', '/gardens') - .post( - '/v2/entities?options=upsert', - utils.readExampleFile('./test/unit/ngsiv2/contextRequests/secondSingleMeasure.json') - ) + .post('/v2/op/update', utils.readExampleFile('./test/unit/ngsiv2/contextRequests/multimeasure.json')) .reply(204); }); @@ -248,19 +236,7 @@ describe('AMQP Transport binding: measures', function () { contextBrokerMock .matchHeader('fiware-service', 'smartgondor') .matchHeader('fiware-servicepath', '/gardens') - .post( - '/v2/entities?options=upsert', - utils.readExampleFile('./test/unit/ngsiv2/contextRequests/multipleMeasure.json') - ) - .reply(204); - - contextBrokerMock - .matchHeader('fiware-service', 'smartgondor') - .matchHeader('fiware-servicepath', '/gardens') - .post( - '/v2/entities?options=upsert', - utils.readExampleFile('./test/unit/ngsiv2/contextRequests/secondMultipleMeasure.json') - ) + .post('/v2/op/update', utils.readExampleFile('./test/unit/ngsiv2/contextRequests/multimeasure2.json')) .reply(204); }); diff --git a/test/unit/ngsiv2/mqttBinding-test.js b/test/unit/ngsiv2/mqttBinding-test.js index 1876bb58..47c4d778 100644 --- a/test/unit/ngsiv2/mqttBinding-test.js +++ b/test/unit/ngsiv2/mqttBinding-test.js @@ -289,19 +289,7 @@ describe('MQTT Transport binding: measures', function () { contextBrokerMock .matchHeader('fiware-service', 'smartgondor') .matchHeader('fiware-servicepath', '/gardens') - .post( - '/v2/entities?options=upsert', - utils.readExampleFile('./test/unit/ngsiv2/contextRequests/singleMeasure.json') - ) - .reply(204); - - contextBrokerMock - .matchHeader('fiware-service', 'smartgondor') - .matchHeader('fiware-servicepath', '/gardens') - .post( - '/v2/entities?options=upsert', - utils.readExampleFile('./test/unit/ngsiv2/contextRequests/secondSingleMeasure.json') - ) + .post('/v2/op/update', utils.readExampleFile('./test/unit/ngsiv2/contextRequests/multimeasure.json')) .reply(204); }); @@ -329,19 +317,7 @@ describe('MQTT Transport binding: measures', function () { contextBrokerMock .matchHeader('fiware-service', 'smartgondor') .matchHeader('fiware-servicepath', '/gardens') - .post( - '/v2/entities?options=upsert', - utils.readExampleFile('./test/unit/ngsiv2/contextRequests/multipleMeasure.json') - ) - .reply(204); - - contextBrokerMock - .matchHeader('fiware-service', 'smartgondor') - .matchHeader('fiware-servicepath', '/gardens') - .post( - '/v2/entities?options=upsert', - utils.readExampleFile('./test/unit/ngsiv2/contextRequests/secondMultipleMeasure.json') - ) + .post('/v2/op/update', utils.readExampleFile('./test/unit/ngsiv2/contextRequests/multimeasure2.json')) .reply(204); });