protected Map parseKvp(Map /* <String,String> */ raw) throws Exception { // parse like the dispatcher but make sure we don't change the original map HashMap input = new HashMap(raw); List<Throwable> errors = KvpUtils.parse(input); if (errors != null && errors.size() > 0) throw (Exception) errors.get(0); return caseInsensitiveKvp(input); }
protected void setUpSpring(List<String> springContextLocations) { super.setUpSpring(springContextLocations); springContextLocations.add("classpath:/org/geoserver/wcs/ResourceAccessManagerContext.xml"); }
/** Add the users */ @Override protected void setUpTestData(SystemTestData testData) throws Exception { super.setUpTestData(testData); File security = new File(testData.getDataDirectoryRoot(), "security"); security.mkdir(); File users = new File(security, "users.properties"); Properties props = new Properties(); props.put("admin", "geoserver,ROLE_ADMINISTRATOR"); props.put("cite", "cite,ROLE_DUMMY"); props.put("cite_noworld", "cite,ROLE_DUMMY"); props.put("cite_noworld_challenge", "cite,ROLE_DUMMY"); props.put("cite_usa", "cite,ROLE_DUMMY"); props.store(new FileOutputStream(users), ""); }
protected void setInputLimit(int kbytes) { GeoServer gs = getGeoServer(); WCSInfo info = gs.getService(WCSInfo.class); info.setMaxInputMemory(kbytes); gs.save(info); }
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); testData.addRasterLayer(MOSAIC, "raster-filter-test.zip", null, getCatalog()); testData.addRasterLayer(RAIN, "rain.zip", "asc", getCatalog()); testData.addRasterLayer( SPATIO_TEMPORAL, "spatio-temporal.zip", null, null, SystemTestData.class, getCatalog()); }
/** Runs GetCoverage on the specified parameters and returns an array of coverages */ protected GridCoverage[] executeGetCoverageKvp(Map<String, Object> raw) throws Exception { GetCoverageType getCoverage = (GetCoverageType) kvpreader.read(kvpreader.createRequest(), parseKvp(raw), raw); GridCoverage[] result = service.getCoverage(getCoverage); coverages.addAll(Arrays.asList(result)); return result; }
protected void setOutputLimit(int kbytes) { GeoServer gs = getGeoServer(); WCSInfo info = gs.getService(WCSInfo.class); info.setMaxOutputMemory(kbytes); gs.save(info); }
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData);