buda-base / lds-pdi

http://purl.bdrc.io BDRC Linked Data Server
Apache License 2.0
2 stars 0 forks source link

use query in lds-query for describing the resource #71

Closed eroux closed 6 years ago

eroux commented 6 years ago

Instead of having the query hardcoded (here), there should be a way to get it from lds-query and parametrize it with injection prevention mechanisms, like any other query. One of the reasons (besides injection prevention) is that for etexts we may want a small variantion

MarcAgate commented 6 years ago

Implemented as of commit 5126e93 using new queryFileParser/Tracker

However, this causes an issue in verious testUnit since the global (but local) property QUERY_PATH is not loaded in the test environment... we need to deal with that... if possible

eroux commented 6 years ago

sure, there should be a static set of query files in src/test/resources/arq/ that should be used in the tests

MarcAgate commented 6 years ago

ServiceConfig.initForTest() is now updating the templates in a local git dir for test purpose, from lds-queries repo. queryPath for test is taken from lds-pdi.properties (it's ./lds-queries/ ) This way, templates for test and templates for PROD are always in sync

eroux commented 6 years ago

I don't think it's a good idea... tests shouldn't depend on lds-queries, they should be self-contained, I still think a static set of query files in src/test/resources/arq/ would be better... they don't need to use git or anything

MarcAgate commented 6 years ago

All of these points have been addressed since commit ce9f7e6

eroux commented 6 years ago

thanks!