Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

access to id, service and subservice in jexl context for functional test #1636

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/functional/functional-tests-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ describe('FUNCTIONAL TESTS AUTO', function () {
}
let type = 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;
iotAgentLib.activate(config.iota, function (error) {
Expand Down
8 changes: 4 additions & 4 deletions test/functional/functional-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
20 changes: 4 additions & 16 deletions test/functional/testCases.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -1785,7 +1784,7 @@ const testCases = [
object_id: 'a',
name: 'attr_a',
type: 'Text',
expression: 'a+":"+service+subservice+id+type'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

groupToIoTAConfigType is not providen deviceId

Maybe testUtils.testCase should do that

expression: 'a+":"+service+subservice+type'
}
]
}
Expand Down Expand Up @@ -1816,12 +1815,7 @@ const testCases = [
id: globalEnv.entity_name,
type: globalEnv.entity_type,
attr_a: {
value:
'text:' +
globalEnv.service +
globalEnv.servicePath +
globalEnv.deviceId +
globalEnv.entity_type,
value: 'text:' + globalEnv.service + globalEnv.servicePath + globalEnv.entity_type,
type: 'Text'
}
}
Expand All @@ -1830,7 +1824,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',
Expand Down Expand Up @@ -1859,7 +1852,7 @@ const testCases = [
object_id: 'c',
name: 'attr_c',
type: 'Text',
expression: 'c+":"+service+subservice+id+type'
expression: 'c+":"+service+subservice+type'
},
{
object_id: 'd',
Expand Down Expand Up @@ -1923,12 +1916,7 @@ const testCases = [
},
attr_c: {
type: 'Text',
value:
'text:' +
globalEnv.service +
globalEnv.servicePath +
globalEnv.deviceId +
globalEnv.entity_type
value: 'text:' + globalEnv.service + globalEnv.servicePath + globalEnv.entity_type
},
attr_d: {
type: 'Float',
Expand Down
Loading