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

Conversation

AlvaroVega
Copy link
Member

fix for #1523

@@ -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

@AlvaroVega AlvaroVega changed the title access to service and subservice in jexl context for functional test access to id, service and subservice in jexl context for functional test Aug 7, 2024
@AlvaroVega AlvaroVega marked this pull request as ready for review August 7, 2024 09:20
@fgalan
Copy link
Member

fgalan commented Aug 7, 2024

I think it would be wise to use same literals than the one used at CB (https://github.com/telefonicaid/fiware-orion/blob/master/doc/manuals/orion-api.md#macro-substitution)

  • id: for the id of the entity
  • type: for the type of the entity
  • service: for the service (i.e. fiware-service header value) in the
    update request triggering the subscription.
  • servicePath: for the service path (i.e. fiware-servicepath header value) in the
    update request triggering the subscription.
  • authToken: for the authorization token (i.e. x-auth-token` header value) in the
    update request triggering the subscription.
  • All the attributes in the entity triggering the notification (included in the update triggering the notification or not)

Is the PR working that way?

@AlvaroVega
Copy link
Member Author

Is the PR working that way?

Not. This is just to align functional tests with implemented feature in iotagent-node-lib, specially test about jexl context

@fgalan
Copy link
Member

fgalan commented Aug 8, 2024

Is the PR working that way?

Not. This is just to align functional tests with implemented feature in iotagent-node-lib, specially test about jexl context

CB uses servicePath. IOTA uses subservice. They are different but probably is not a good idea to change any of them to align, due to potential backward compatibility problems and changes in the IOTA DB model.

Copy link
Collaborator

@mapedraza mapedraza left a comment

Choose a reason for hiding this comment

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

LGTM

@mapedraza mapedraza merged commit c8642f9 into master Aug 9, 2024
8 checks passed
@mapedraza mapedraza deleted the fix/access_service_servicepath_jexl_functional_test branch August 9, 2024 10:01
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.

3 participants