feat: verdaccio for acceptance test#959
Conversation
arcanis
left a comment
There was a problem hiding this comment.
That's a good idea! One particular thing is that our mock server is also able to serve git repositories (to test fetching Git packages) - can we do this with the verdaccio API (just add routes that we handle ourselves)?
| @@ -0,0 +1,37 @@ | |||
| storage: /Users/jpicado/.local/share/verdaccio/storage_yarn | |||
There was a problem hiding this comment.
I guess this won't work everywhere :p
There was a problem hiding this comment.
Hehe ... yeah the idea is create a temp folder and publish all fixture packages there on the setup phase. For now I am working in that part, I managed to publish but I don’t know how to invoke ‘yarn publish’ programmatically with the dev version. I did it using exec with npm
|
We can add a middleware plugin adding new endpoints and that might work. |
|
@arcanis I'll close this, I'm having no much time lately and also there is a bug with the Node API which I was aiming to use here. I'll try again when I get more time. |
What's the problem this PR addresses?
Current acceptance-test are based on a mocked registry and each new scenario might need to modify that server and increase complexity, more code to maintain and less intuitive configuration.
How did you fix it?
The proposal is to use Verdaccio instead as a registry server. There are a few advantages of this migration:
pkg-tests-fixturesat all. All fixtures packages will be published in the setup phase.What's missing? This is just a wip PoC (just limited to one test file) with the idea to discover challenges
I creating this as a draft because still too much work to do, but I just wanna share current progress in order to get early feedback (and I need the CI to verify all works properly).