[redland-dev] Postgresql / Unit Tests
Dave Beckett
Dave.Beckett at bristol.ac.uk
Tue Sep 13 17:20:47 BST 2005
On Tue, 2005-09-13 at 01:45 -0600, Charles F. I. Savage wrote:
> Hi everyone,
>
> I'm interested in using Redland with postgresql. As far as I could see,
> no one has done this yet.
You're correct. It's on the TODO someday pile :)
> Thus, I've had a friend put together a postgresql storage driver. It is
> basically a direct port of the code in rdf_storage_mysql.c (including
> the same database schema). I'd like to test this code as thoroughly as
> possible - what is the appropriate way to do this? Should I use the
> unit tests associated with the Python bindings (or with the other
> language bindings), the tests that are run by make check, or there other
> unit tests that I'm not seeing?
>
> Last, if people are interested, we'd be happy to donate this code to the
> Redland project.
That sounds great. You are right that the python bindings do exercise a
good lot of the API, but there are unit tests in the rdf_CLASS.c files
for most classes as you said (those run by 'make check'). The
rdf_model.c tests exercise the model API and could be copied to use the
postgres backend as a test for it.
The tricky part as you might guess, is that sql storage tests require a
running sql database which is rather hard to set up in an automated
fashion such that 'configure; make; make check' works. Why is why I
don't routinely check the MySQL or other optional stores in test cases.
Dave
More information about the redland-dev
mailing list