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

[Bug?] Using device data JEXL context when executing iotAgentLib.update into tests #1523

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mapedraza
Copy link
Collaborator

@mapedraza mapedraza commented Nov 9, 2023

When executing tests in IoTA Lib as usual way ( using iotAgentLib.update method ), the device JEXL context does not include parameters such as service, subservice or device ID.

I do not know if this is something that need to be fixed, but, at least, it should be documented. Found when migrating telefonicaid/iotagent-json#769 to this repo

This PR adds a test to verify it (it is green since it is not comparing the value, need to be amended)

@mapedraza
Copy link
Collaborator Author

As you can see here:
https://github.com/telefonicaid/iotagent-node-lib/actions/runs/6809822840/job/18516853776?pr=1523#step:5:905

The result is:

{
  id: 'testContext',
  type: 'testNullExplicit',
  a: {
    type: 'Number',
    value: 'Text123:undefinedundefinedundefinedtestNullExplicit'
  }

See the expression used:

expression: 'a+":"+service+subservice+id+type'

@fgalan
Copy link
Member

fgalan commented Aug 9, 2024

Should this issue be closed after the merging of PR #1636?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants