ITISFoundation / cookiecutter-osparc-service

A cookiecutter for integrating services in oSparc simcore platform
MIT License
0 stars 5 forks source link

πŸ› Test "make build" of generated service #116

Open JavierGOrdonnez opened 1 month ago

JavierGOrdonnez commented 1 month ago

WIP: work in progress

Current the cookiecutter tests only test that it is possible to generate a dummy project with the cookiecutter, but not whether such project is functional (e.g. make build can be run on it). This can lead to issues like the one we had regarding the changes in the integration tooling (see here) not being detected until someone tries to use the cookiecutter for a real case scenario.

This was said to not be possible because venv would need to be activated within the subprocess, which doesnt seem possible (or at least easy). Nonetheless, this only seems to be necessary to use the cookiecutter, not to test the "make" commands on the generated project.

The changes here show that it is possible to execute "make build" and, in the case of error (which I am currently getting), print the stderr to a file for debugging.

This is WiP - ideally will find what is giving this errors and manage to successfully build within the test, providing a real test of the cookiecutter ability to generate a functional service.

NB these changes should also be applied to the other cookiecutters once they work and get merged