-
Notifications
You must be signed in to change notification settings - Fork 89
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
Add: Functional tests suite #1525
Conversation
So PR telefonicaid/iotagent-json#769 should be closed? |
No, It should be adapted, in a manner that it can use util files and other stuff in the agent, so same tests can be executed (using same case definitions) but running in the agent. This PR should be merged first. |
@@ -0,0 +1,372 @@ | |||
## Functional test suite |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test/functional/README.md file should be linked in the root README.md file, from the right place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added here: 05b86a5
/* eslint-disable no-unused-vars*/ | ||
/* eslint-disable no-unused-expressions*/ | ||
|
||
// const iotaJson = require('../../lib/iotagent-json'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leftover comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed here: 05b86a5
test/functional/functional-tests.js
Outdated
/* eslint-disable no-unused-vars*/ | ||
/* eslint-disable no-unused-expressions*/ | ||
|
||
// const iotaJson = require('../..'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leftover comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed here: 05b86a5
@@ -0,0 +1,1641 @@ | |||
const config = require('./config-test.js'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
License header should be included.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added here: 05b86a5
}, | ||
{ | ||
describeName: '0110 - Simple group with active attributes + JEXL multiples expressions at same time', | ||
skip: 'lib', // Explanation in #1523 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solving #1523 would remove this skip?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
test/functional/testUtils.js
Outdated
expect(response.body, ERR_MEAS_BODY).to.be.empty; | ||
} else { | ||
const response = await sendMeasureIotaLib(measure, provision); | ||
// expect(response, ERR_MEAS_BODY).to.be.empty; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lefover comment? Or something pending to fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solved here: 05b86a5
const testCases = [ | ||
// BASIC TESTS | ||
{ | ||
describeName: '0010 - Simple group without attributes', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest a similar apporach than in CB test cases.
- The number identifies the issue number associated to the test
- For those tests not associated to specific issue (as the "starting ones"), let's use 0000
Co-authored-by: Fermín Galán Márquez <[email protected]>
Co-authored-by: Fermín Galán Márquez <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Fermín Galán Márquez <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR includes the functional test suite included in PR telefonicaid/iotagent-json#769
After some internal discussions, this suite was ported to IoTA Lib