Hi,
I'm going forward on the live testing thing and I'm
faced with a decision I'd like to discuss.
So far I've created a LiveData class for testing against
a data directory using only files as data stores, and
a LiveDbmsData that handles the following:
* grabbing a property file with connection params to the local db
to be used for testing
* filtering catalog.xml with the the params contained in the fixture
so that geoserver will connect to the db
* running a sql script file using the connection provided by
a jdbc data store.
Now, there are a few issues.
The first is with the property file.
I've setup things so that the keys in the property file are
used everywhere: they have to be the name of the connection
params to the jdbc datastore used to run the script
(which will be looked up with DatastoreFinder), and they are
the tokens that will be replaced in catalog.xml.
It makes things simpler, no aliases to work with, thought it basically makes it impossible to setup two connections to two
different jdbc datastores. Do you see an isue with that?
It suits my needs and keeps things simple, but I'm open
to alternate suggestions.
The second is.. with the property file!
We agreed that it would be good to lookup it into the
current user's home. Ok, let's say we look up in
.gstest/fixture.properties.
What if the file is not there? We do not run the test?
Or we copy a prototype file from the classpath and try
a connection test?
Of course if the connection test fails the test will
be disabled... I'll have to basically use the same code
as in GeoTool's OnlineTest... but I cannot use it
directly, since the run and check once mechanism
will have to be placed in a subclass of GeoServerAbstractTestSupport.
Suggestions on that one? I just copy some of the code from
OnlineTestCase to a GeoServerDbmsTestSupport? Any other
idea you'd like better?
Cheers
Andrea