app-schema online tests fail without Oracle

Description

app-schema online tests fail if run without Oracle because the module app-schema-oracle-test is always included; its test fixtures do not check for the presence of ~/.geoserver/oracle.properties and instead fail if the fixture configuration file is absent. This behaviour prevents testing against postgis without oracle.

These tests are run in src/extension/app-schema:

cd src/extension/app-schema

Workaround is to use the -pl flag present in Maven 3.2.1 or later. Command line becomes:

mvn -nsu -Djava.awt.headless=true -Dtest.maxHeapSize=1024m -Dtest.maxPermSize=128m -Papp-schema-online-test -pl '!app-schema-oracle-test' clean test

With this flag, app-schema online tests pass on master against postgis 2.1.4+dfsg-2 amd64 / postgresql-9.4 9.4.1-1 amd64 on debian/sid.

~/.geoserver/postgis.properties:

driver = org.postgresql.Driver
url = jdbcostgresql://localhost/refdata
host = localhost
port = 5432
database = refdata
user = refdata
password = XXXXXXXX
passwd = XXXXXXXX
dbtype = postgisng

Database creation:

  1. as root become postgres
    su - postgres

  2. connect to local cluster
    psql

create database refdata;
\c refdata
create role refdata with login password 'XXXXXXXX';
alter database refdata owner to refdata;
create extension postgis;
alter view geography_columns owner to refdata;
alter view geometry_columns owner to refdata;
alter view raster_columns owner to refdata;
alter view raster_overviews owner to refdata;
alter table spatial_ref_sys owner to refdata;
– see: http://docs.geoserver.org/latest/en/developer/programming-guide/app-schema/index.html
– see: http://spatialreference.org/ref/epsg/4979/postgis/
– note: spatialreference.org srid is wrong: srid 94979 should be 4979
INSERT into spatial_ref_sys (srid, auth_name, auth_srid, proj4text, srtext) values ( 4979, 'epsg', 4979, '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs ', 'GEOGCS["WGS 84",DATUM["World Geodetic System 1984",SPHEROID["WGS 84",6378137.0,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0.0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.017453292519943295],AXIS["Geodetic latitude",NORTH],AXIS["Geodetic longitude",EAST],AXIS["Ellipsoidal height",UP],AUTHORITY["EPSG","4979"]]');
– missing functions required for refdataset sql but removed in postgis 2.1
create or replace function public.ndims(g geometry)
returns smallint as $$
begin
return public.st_ndims(g);
end;
$$ language plpgsql immutable strict;
create or replace function public.srid(g geometry)
returns integer as $$
begin
return public.st_srid(g);
end;
$$ language plpgsql immutable strict;

Note that West Australians will also need to apply the PostGIS timezone abbreviation fix:
https://www.seegrid.csiro.au/wiki/Infosrvices/JenkinsGeoserverMasterTechnicalNotes#PostGIS_timezone_fix_for_Western_Australia - https://www.seegrid.csiro.au/wiki/Infosrvices/JenkinsGeoserverMasterTechnicalNotes#PostGIS_timezone_fix_for_Western_Australia

See also:
http://docs.geoserver.org/latest/en/developer/programming-guide/app-schema/index.html - http://docs.geoserver.org/latest/en/developer/programming-guide/app-schema/index.html

Note that the data reference set tests work fine without Oracle:
https://www.seegrid.csiro.au/wiki/Infosrvices/DataReferenceSet - https://www.seegrid.csiro.au/wiki/Infosrvices/DataReferenceSet

Environment

None

Assignee

Unassigned

Reporter

codehaus

Triage

None

Fix versions

None

Affects versions

Components

Priority

Low
Configure