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

Testsuite improvements #3555

Merged
merged 14 commits into from
Mar 25, 2021
Merged

Testsuite improvements #3555

merged 14 commits into from
Mar 25, 2021

Conversation

daneryl
Copy link
Collaborator

@daneryl daneryl commented Mar 23, 2021

fixes: #3561

PR checklist:

  • Update READ.me ?
  • Update API documentation ?

QA checklist:

  • Smoke test the functionality described in the issue
  • Test for side effects
  • UI responsiveness
  • Cross browser testing
  • Code review

@daneryl daneryl force-pushed the testsuite_improvements branch 3 times, most recently from 5de9253 to 8a1403a Compare March 23, 2021 21:49
@daneryl daneryl marked this pull request as ready for review March 23, 2021 22:23
@RafaPolit RafaPolit self-requested a review March 23, 2021 22:24
@daneryl daneryl force-pushed the testsuite_improvements branch from 8a1403a to b20da8b Compare March 24, 2021 14:37
Copy link
Member

@RafaPolit RafaPolit left a comment

Choose a reason for hiding this comment

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

I think these are great improvements. Just a couple of comments / questions more than changes request. I ran the suite several times, I had the exportRoutes timeout in one of the runs, but could not replicate it again, so it may have been an intermittent test or something just hanging up on my end.

Comment on lines 48 to 51
uploadedDocuments: `${__dirname}/specs/uploads/`,
attachments: `${__dirname}/specs/uploads/`,
customUploads: `${__dirname}/specs/customUploads/`,
customUploads: `${__dirname}/specs/uploads/`,
temporalFiles: `${__dirname}/specs/uploads/`,
Copy link
Member

Choose a reason for hiding this comment

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

I think this is potentially dangerous. Having all test paths be identical means that you could 'use' the wrong path or interchange the paths in the tests and they will pass nonetheless. I believe that was the intent of having 'customUploads' be a different path. Should we create a tech debt issue with this? Or do you think it is not worth it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@RafaPolit i have reverted the customUploads path, its now /specs/customUploads again, for the others i think the issue described still remains, we should create a tech debt.

@@ -26,8 +27,9 @@ describe('upload routes', () => {
let req;
let file;

const deleteAllFiles = cb => {
const directory = `${__dirname}/uploads/`;
const deleteAllFiles = async cb => {
Copy link
Member

Choose a reason for hiding this comment

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

There are more calls to deleteAllFiles in this spec that are not being awaited. They have a done inside that could cause the same effect, but maybe for consistency add the await on those calls? (currently lines 88 and 186)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch, the 2 calls are now properly awaited

Comment on lines 69 to 66
uploadedDocuments: `${__dirname}/specs/uploads/${subPath}`,
attachments: `${__dirname}/specs/uploads/${subPath}`,
customUploads: `${__dirname}/specs/uploads/${subPath}`,
temporalFiles: `${__dirname}/specs/uploads/${subPath}`,
Copy link
Member

Choose a reason for hiding this comment

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

Same concern as above,! Maybe this solves it if we are using only one at a time in each test?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this was not being used anymore actually, it has been removed now.

@daneryl daneryl force-pushed the testsuite_improvements branch 2 times, most recently from 7df7ec9 to d6a3528 Compare March 25, 2021 15:29
@RafaPolit
Copy link
Member

LGTM

@RafaPolit RafaPolit merged commit 46d16e6 into development Mar 25, 2021
@RafaPolit RafaPolit deleted the testsuite_improvements branch March 25, 2021 15:49
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.

Testsuite improvements
2 participants