From e07371da683fd847dbbe8ec642759c9ef4e544a7 Mon Sep 17 00:00:00 2001 From: mapedraza <40356341+mapedraza@users.noreply.github.com> Date: Mon, 26 Aug 2024 12:49:32 +0200 Subject: [PATCH] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fermín Galán Márquez --- lib/services/northBound/deviceGroupAdministrationServer.js | 2 +- test/unit/general/deviceService-test.js | 4 ++-- test/unit/mongodb/mongodb-configGroup-registry-test.js | 2 +- test/unit/mongodb/mongodb-group-registry-test.js | 2 +- test/unit/ngsiv2/general/deviceService-test.js | 4 ++-- test/unit/ngsiv2/general/iotam-autoregistration-test.js | 6 +++--- test/unit/ngsiv2/provisioning/device-group-api-test.js | 2 +- .../device-provisioning-configGroup-api_test.js | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/services/northBound/deviceGroupAdministrationServer.js b/lib/services/northBound/deviceGroupAdministrationServer.js index 2ad2f8a21..99fc2ae40 100644 --- a/lib/services/northBound/deviceGroupAdministrationServer.js +++ b/lib/services/northBound/deviceGroupAdministrationServer.js @@ -38,7 +38,7 @@ const mandatoryHeaders = ['fiware-service', 'fiware-servicepath']; const mandatoryParameters = ['resource', 'apikey']; const constants = require('../../constants'); -// Create new templeate for configuration groups replacing services by CONFIGGROUP_TERM +// Create new template for configuration groups replacing services by CONFIGGROUP_TERM const templateGroup = JSON.parse(JSON.stringify(templateGroupService)); templateGroup.properties[constants.CONFIGGROUP_TERM] = templateGroup.properties.services; delete templateGroup.properties.services; diff --git a/test/unit/general/deviceService-test.js b/test/unit/general/deviceService-test.js index 8078bae31..3b62b4684 100644 --- a/test/unit/general/deviceService-test.js +++ b/test/unit/general/deviceService-test.js @@ -210,7 +210,7 @@ describe('NGSI-v2 - Device Service: utils', function () { async.series([iotAgentLib.clearAll, iotAgentLib.deactivate], done); }); - //FIXME: this test will be removed if at the end /iot/services API (now Deprecated) is removed + // #FIXME1649: this test will be removed if at the end /iot/services API (now Deprecated) is removed describe('When an existing device tries to be retrieved with retrieveOrCreate()', function () { beforeEach(function (done) { contextBrokerMock = nock('http://192.168.1.1:1026') @@ -277,7 +277,7 @@ describe('NGSI-v2 - Device Service: utils', function () { }); }); - //FIXME: this test will be removed if at the end /iot/services API (now Deprecated) is removed + // #FIXME1649: this test will be removed if at the end /iot/services API (now Deprecated) is removed describe('When an unexisting device tries to be retrieved for an existing APIKey', function () { beforeEach(function (done) { diff --git a/test/unit/mongodb/mongodb-configGroup-registry-test.js b/test/unit/mongodb/mongodb-configGroup-registry-test.js index 26d1f3d84..a6a945283 100644 --- a/test/unit/mongodb/mongodb-configGroup-registry-test.js +++ b/test/unit/mongodb/mongodb-configGroup-registry-test.js @@ -1,5 +1,5 @@ /* - * Copyright 2015 Telefonica Investigación y Desarrollo, S.A.U + * Copyright 2024 Telefonica Investigación y Desarrollo, S.A.U * * This file is part of fiware-iotagent-lib * diff --git a/test/unit/mongodb/mongodb-group-registry-test.js b/test/unit/mongodb/mongodb-group-registry-test.js index 2ca1dd4d9..f15303e8e 100644 --- a/test/unit/mongodb/mongodb-group-registry-test.js +++ b/test/unit/mongodb/mongodb-group-registry-test.js @@ -23,7 +23,7 @@ * Modified by: Daniel Calvo - ATOS Research & Innovation */ -// FIXME: parallel tests in mongodb-configGroup-registry-test.js. Remove this file if at the end /iot/services API (now Deprecated) is removed +// #FIXME1649: parallel tests in mongodb-configGroup-registry-test.js. Remove this file if at the end /iot/services API (now Deprecated) is removed /* eslint-disable no-unused-vars */ const iotAgentLib = require('../../../lib/fiware-iotagent-lib'); diff --git a/test/unit/ngsiv2/general/deviceService-test.js b/test/unit/ngsiv2/general/deviceService-test.js index 4680e705f..e42ed3e36 100644 --- a/test/unit/ngsiv2/general/deviceService-test.js +++ b/test/unit/ngsiv2/general/deviceService-test.js @@ -210,7 +210,7 @@ describe('NGSI-v2 - Device Service: utils', function () { nock.cleanAll(); async.series([iotAgentLib.clearAll, iotAgentLib.deactivate], done); }); - //FIXME: this test will be removed if at the end /iot/services API (now Deprecated) is removed + // #FIXME1649: this test will be removed if at the end /iot/services API (now Deprecated) is removed describe('When an existing device tries to be retrieved with retrieveOrCreate()', function () { beforeEach(function (done) { // This mock does not check the payload since the aim of the test is not to verify @@ -272,7 +272,7 @@ describe('NGSI-v2 - Device Service: utils', function () { }); }); }); - //FIXME: this test will be removed if at the end /iot/services API (now Deprecated) is removed + // #FIXME1649: this test will be removed if at the end /iot/services API (now Deprecated) is removed describe('When an unexisting device tries to be retrieved for an existing APIKey', function () { beforeEach(function (done) { // This mock does not check the payload since the aim of the test is not to verify diff --git a/test/unit/ngsiv2/general/iotam-autoregistration-test.js b/test/unit/ngsiv2/general/iotam-autoregistration-test.js index 1f15fa952..8a8d0149c 100644 --- a/test/unit/ngsiv2/general/iotam-autoregistration-test.js +++ b/test/unit/ngsiv2/general/iotam-autoregistration-test.js @@ -351,7 +351,7 @@ describe('NGSI-v2 - IoT Manager autoregistration', function () { }); }); - //FIXME: this test will be removed if at the end /iot/services API (now Deprecated) is removed + // #FIXME1649: this test will be removed if at the end /iot/services API (now Deprecated) is removed describe('When a new service is created in the IoT Agent', function () { beforeEach(function (done) { nock.cleanAll(); @@ -422,7 +422,7 @@ describe('NGSI-v2 - IoT Manager autoregistration', function () { }); }); - //FIXME: this test will be removed if at the end /iot/services API (now Deprecated) is removed + // #FIXME1649: this test will be removed if at the end /iot/services API (now Deprecated) is removed describe('When a service is removed from the IoT Agent', function () { beforeEach(function (done) { nock.cleanAll(); @@ -493,7 +493,7 @@ describe('NGSI-v2 - IoT Manager autoregistration', function () { }); }); - //FIXME: this test will be removed if at the end /iot/services API (now Deprecated) is removed + // #FIXME1649: this test will be removed if at the end /iot/services API (now Deprecated) is removed describe('When a new service with static attributes is created in the IoT Agent', function () { beforeEach(function (done) { nock.cleanAll(); diff --git a/test/unit/ngsiv2/provisioning/device-group-api-test.js b/test/unit/ngsiv2/provisioning/device-group-api-test.js index e2871cff7..832837d13 100644 --- a/test/unit/ngsiv2/provisioning/device-group-api-test.js +++ b/test/unit/ngsiv2/provisioning/device-group-api-test.js @@ -23,7 +23,7 @@ /* eslint-disable no-unused-vars */ -// FIXME: parallel tests in device-provisioning-configGroup-api_test.js. +// #FIXME1649: parallel tests in device-provisioning-configGroup-api_test.js. const iotAgentLib = require('../../../../lib/fiware-iotagent-lib'); const _ = require('underscore'); diff --git a/test/unit/ngsiv2/provisioning/device-provisioning-configGroup-api_test.js b/test/unit/ngsiv2/provisioning/device-provisioning-configGroup-api_test.js index 82a13a9b9..6248ca7dc 100644 --- a/test/unit/ngsiv2/provisioning/device-provisioning-configGroup-api_test.js +++ b/test/unit/ngsiv2/provisioning/device-provisioning-configGroup-api_test.js @@ -1,5 +1,5 @@ /* - * Copyright 2014 Telefonica Investigación y Desarrollo, S.A.U + * Copyright 2024 Telefonica Investigación y Desarrollo, S.A.U * * This file is part of fiware-iotagent-lib *