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

FIX broken unit tests #354

Merged
merged 1 commit into from
Dec 5, 2018
Merged

FIX broken unit tests #354

merged 1 commit into from
Dec 5, 2018

Conversation

fgalan
Copy link
Member

@fgalan fgalan commented Dec 4, 2018

Please @dcalvoalonso review

@@ -181,12 +184,6 @@ describe('Configuration API support', function() {
.post('/iot/protocols', configurationProvision)
.reply(200, {});

contextBrokerMock
Copy link
Member Author

Choose a reason for hiding this comment

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

I guess this mock is not needed given this test is about generating and detect and error, so I understand the error interrupts the processing flow and CB is never called.

NTC

@@ -186,12 +188,6 @@ describe('Configuration API support', function() {
.post('/iot/protocols', configurationProvision)
.reply(200, {});

contextBrokerMock
Copy link
Member Author

Choose a reason for hiding this comment

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

I guess this mock is not needed given this test is about generating and detect and error, so I understand the error interrupts the processing flow and CB is never called.

NTC

@dcalvoalonso
Copy link
Contributor

LGTM @fgalan . I have reviewed the calls and they seem to be consistent! ;)

@fgalan
Copy link
Member Author

fgalan commented Dec 5, 2018

Maybe IOTA-LWM2M would need a similar adaptation. Could you manage @dcalvoalonso , please? This PR (and PR telefonicaid/iotagent-ul#313) could serve as guide, so it should be quite straighforward.

Copy link
Member

@AlvaroVega AlvaroVega left a comment

Choose a reason for hiding this comment

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

LGTM

@AlvaroVega AlvaroVega merged commit d5ebc17 into master Dec 5, 2018
@AlvaroVega AlvaroVega deleted the hardening/fix_travis_ci2 branch December 5, 2018 09:38
@dcalvoalonso
Copy link
Contributor

dcalvoalonso commented Dec 5, 2018

Maybe IOTA-LWM2M would need a similar adaptation. Could you manage @dcalvoalonso , please? This PR (and PR telefonicaid/iotagent-ul#313) could serve as guide, so it should be quite straighforward.

It seems that tests with IOTA-LWM2M are still being passed since cbHost field of groups provisioning is not used in any of them. Please note that IOTA-LWM2M does not use mocks to intercept requests to Orion CB but a real instance (telefonicaid/lightweightm2m-iotagent#106) hosted in localhost.

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