-
Notifications
You must be signed in to change notification settings - Fork 56
chore: add functional tests #49
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
Conversation
- mimic functional testing from upstream verdaccio - add code build to travis ci
@juanpicado It would be great if you could take a look. It's basically the same approach as verdaccio does itself for unit + functional tests. We adapted some things, like for example for functional tests we start a small express process that mocks the required gitlab calls.
We haven't implemented e2e at the moment, though I think we would take a different approach than verdaccio in that case: use docker compose to launch both verdaccio and gitlab, plus a third image that actually performed the e2e tests against the started environment.
Maybe we can also use this exercise for searching a common approach to support testing for plugins directly from verdaccio. This adds copies of support code that already exists in verdaccio, but at the moment that code is an internal implementation detail from verdaccio, not directly importable.
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.
looks good! I like to wait for @juanpicado point of view on this. Anyway, a verdaccio-plugins repo with shared infra and some plugins like this could make sense.
test/functional/auth/index.js
Outdated
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.
minor: style
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.
minor: consistent white-space usage
test/functional/teardown.js
Outdated
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.
why commented out code?
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.
Because I'm really lazy, I will correct it
@dlouzan looks good to me. only minor comments.
@dlouzan I'll take a look, just give me some days.
- fix publish test expectations - small style corrections
Maybe we can also use this exercise for searching a common approach to support testing for plugins directly from verdaccio. This adds copies of support code that already exists in verdaccio, but at the moment that code is an internal implementation detail from verdaccio, not directly importable.
@dlouzan one of my objectives was exactly externalizing functional internal implementation for other usages. It's in my queue of tasks.
Currently, we are working on lerna approach that will allow us to create more packages with no pain and my next step is put all this logic out of the box, I'm sure we will find a common approach here.
Are we going to merge this or should I close it?
@dlouzan @bufferoverflow it's ok for you guys?
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.
We are working on the core https://github.com/verdaccio/core/tree/master/packages multi package project to bring all these things to specific modules, soon this C&P won't be need it.
@dlouzan I tested them, fine for me. 👍
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.
👍
Thank you guys! Awesome!
Uh oh!
There was an error while loading. Please reload this page.
Fixes #40