Closed bobeal closed 3 years ago
I think it is a great idea. The most can be mocked for runing the test, the better. In fact some other IOTA-related repos (IOTA Lib, IOTA UL, IOTA JSON) and doing this, as far as I know.
It would be great if you could provide a contribution pull request with the needed changes, please. Thanks!
Yes, actually, the plan was to do it alongside our current work to make the Sigfox agent NGSI-LD compliant :)
Yes, actually, the plan was to do it alongside our current work to make the Sigfox agent NGSI-LD compliant :)
For the sake of clearness and review-ability I'd suggest to split the work in two pieces:
Does it make sense to you?
Moreover, with regards to NGSI-LD, are you planning actual modification in the IOTA code itself? As far as I understand, the NGSI-LD interface towards CB is part of the IOTA Node Lib work and it's already done in a first experimental version available in this branch: https://github.com/telefonicaid/iotagent-node-lib/tree/feature/842_ngsi_ld. No modifications in IOTA code should be needed.
See also how other IOTAs are using this functionality (it's easy, just to use the branch as dependency): https://github.com/telefonicaid/iotagent-ul/pull/420
(Maybe this should be discussed in another issue, this one originally was about nock refactoring :)
For the sake of clearness and review-ability I'd suggest to split the work in two pieces:
- First, a PR with the changes to nock in the current code base (NGSIv2) based, without adding anything related with NGSI-LD
- Second, a PR with contributions with NGSI-LD
Does it make sense to you?
Yes, sure, one issue, one PR :)
But maybe not in this order, because we have to move fast on the NGSI-LD compliance of the Sigfox agent.
In any case, we'll also take care of the NGSIv2 APIs when integrating nock.
(I gonna create another issue for the NGSI-LD topic)
Resolved, cf #83
Currently, the tests require a running context broker to work properly.
As is done in the IoT Agent node lib, they could use the nock library to be able to run independently of any third party system.