Open Jakski opened 9 months ago
IMHO this configuration would be better in the tests.toml :)
I agree, but for now I've left auto-detection using grep in order to not break compatibility with already existing applications.
Ah oops, i misread, now I see you already did that :)
We could also just grep _common.sh
in addition to install
TBH we tend to discourage to "factorize" this kind of stuff like the add_nginx call etc ... Yes it's not pretty but anyway current packaging is pretty much trash (though less worse than packaging v1) until we implement packaging v3 ... Until then it's better to stick to common practice to facilitate community maintenance of all apps even though it's tempting to factorize stuff...
package_check
tries to grep for^ynh_add_nginx_config
in order to decide whether tests with URL should be launched at all. I putynh_add_nginx_config
invocation inscripts/_common.sh
in order to reuse some code betweeninstall
andupgrade
as a functions. With this approachpackage_check
attempts to install my application only withnourl
scenario. That's not correct. The following change makes it possible to overrideis_webapp
parameter during tests by settingwebapp
intests.toml
.Note that invoking
ynh_add_nginx_config
conditionally like:would also make
package_check
treat application as a non-webapp, even though that's not true.