diff --git a/test/functional/functional-tests-runner.js b/test/functional/functional-tests-runner.js index 4a0d6d0db..9a732159d 100755 --- a/test/functional/functional-tests-runner.js +++ b/test/functional/functional-tests-runner.js @@ -63,12 +63,17 @@ describe('FUNCTIONAL TESTS AUTO', function () { if (testCase.loglevel) { logger.setLevel(testCase.loglevel); } - let type = testUtils.groupToIoTAConfigType( + let confType = testUtils.groupToIoTAConfigType( testCase.provision.json.services[0], - testCase.provision.headers.fiwareService, - testCase.provision.headers.fiwareServicepath + testCase.provision.headers['fiware-service'], + testCase.provision.headers['fiware-servicepath'] ); - config.iota.types[type.name] = type.type; + // Inject device id into config as real typeInformation + if (testCase.should[0] && testCase.should[0].measure.qs.i) { + confType.type['id'] = testCase.should[0].measure.qs.i; + } + config.iota.types[confType.name] = confType.type; + iotAgentLib.activate(config.iota, function (error) { done(error); }); diff --git a/test/functional/functional-tests.js b/test/functional/functional-tests.js index 27445ef03..9023c11a6 100755 --- a/test/functional/functional-tests.js +++ b/test/functional/functional-tests.js @@ -115,8 +115,8 @@ describe('FUNCTIONAL TESTS', function () { beforeEach(function (done) { let type = testUtils.groupToIoTAConfigType( provision.json.services[0], - provision.headers.fiwareService, - provision.headers.fiwareServicepath + provision.headers['fiware-service'], + provision.headers['fiware-servicepath'] ); config.iota.types[type.name] = type.type; iotAgentLib.activate(config.iota, function (error) { @@ -214,8 +214,8 @@ describe('FUNCTIONAL TESTS', function () { beforeEach(function (done) { let type = testUtils.groupToIoTAConfigType( provision.json.services[0], - provision.headers.fiwareService, - provision.headers.fiwareServicepath + provision.headers['fiware-service'], + provision.headers['fiware-servicepath'] ); config.iota.types[type.name] = type.type; iotAgentLib.activate(config.iota, function (error) { diff --git a/test/functional/testCases.js b/test/functional/testCases.js index bb3f51bec..31def5e7d 100644 --- a/test/functional/testCases.js +++ b/test/functional/testCases.js @@ -1768,7 +1768,6 @@ const testCases = [ }, { describeName: '0170 - Simple group with active attribute + JEXL expression referencing context attributes', - skip: 'lib', // Explanation in #1523 provision: { url: 'http://localhost:' + config.iota.server.port + '/iot/services', method: 'POST', @@ -1830,7 +1829,6 @@ const testCases = [ }, { describeName: '0180 - Simple group with active attributes + JEXL multiples expressions at same time', - skip: 'lib', // Explanation in #1523 provision: { url: 'http://localhost:' + config.iota.server.port + '/iot/services', method: 'POST', @@ -4203,7 +4201,7 @@ const testCases = [ type: 'Number', entity_name: 'TestType:TestDevice2', entity_type: 'TestType', - expression: 'type+":"+(t*2*static_a)' // Only type is used as JEXL context attr due to #1523 + expression: 'type+":"+(t*2*static_a)' } ], static_attributes: [ @@ -4289,7 +4287,7 @@ const testCases = [ object_id: 't', name: 'temperature', type: 'Number', - entity_name: 'type+":"+(t*2*static_a)', // Only type is used as JEXL context attr due to #1523 + entity_name: 'type+":"+(t*2*static_a)', entity_type: 'TestType' } ],