Mercurial > lada > lada-server
changeset 776:b55f517124e5
merged.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 12 Nov 2015 12:20:12 +0100 |
parents | 95fa207dbd54 (current diff) ee0ee3c37449 (diff) |
children | e3f4f3585cce |
files | |
diffstat | 4 files changed, 25 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/Dockerfile Thu Nov 12 12:19:34 2015 +0100 +++ b/Dockerfile Thu Nov 12 12:20:12 2015 +0100 @@ -55,13 +55,14 @@ $JBOSS_HOME/modules/org/postgres/main/ RUN ln -s /usr/share/java/jts-1.11.jar \ $JBOSS_HOME/modules/system/layers/base/org/hibernate/main/ + RUN curl \ http://www.hibernatespatial.org/repository/org/hibernate/hibernate-spatial/4.3/hibernate-spatial-4.3.jar > \ $JBOSS_HOME/modules/system/layers/base/org/hibernate/main/hibernate-spatial-4.3.jar -RUN cp wildfly/postgres-module.xml \ +RUN ln -s $PWD/wildfly/postgres-module.xml \ $JBOSS_HOME/modules/org/postgres/main/module.xml -RUN cp wildfly/hibernate-module.xml \ +RUN ln -fs $PWD/wildfly/hibernate-module.xml \ $JBOSS_HOME/modules/system/layers/base/org/hibernate/main/module.xml RUN wildfly/execute.sh
--- a/db_schema/setup-db.sh Thu Nov 12 12:19:34 2015 +0100 +++ b/db_schema/setup-db.sh Thu Nov 12 12:20:12 2015 +0100 @@ -10,7 +10,7 @@ psql -d $DB_NAME -f $DIR/lada_schema.sql psql -d $DB_NAME --command \ "GRANT USAGE ON SCHEMA stammdaten, bund, land TO $ROLE_NAME; - GRANT SELECT + GRANT USAGE ON ALL SEQUENCES IN SCHEMA stammdaten, bund, land TO $ROLE_NAME; GRANT SELECT, INSERT, UPDATE, DELETE, REFERENCES ON ALL TABLES IN SCHEMA stammdaten, bund, land TO $ROLE_NAME;"
--- a/pom.xml Thu Nov 12 12:19:34 2015 +0100 +++ b/pom.xml Thu Nov 12 12:20:12 2015 +0100 @@ -208,7 +208,7 @@ <dependency> <groupId>org.wildfly</groupId> <artifactId>wildfly-arquillian-container-remote</artifactId> - <version>8.2.0.Final</version> + <version>8.2.1.Final</version> <scope>test</scope> </dependency> </dependencies> @@ -220,7 +220,7 @@ <dependency> <groupId>org.wildfly</groupId> <artifactId>wildfly-arquillian-container-managed</artifactId> - <version>8.2.0.Final</version> + <version>8.2.1.Final</version> <scope>test</scope> </dependency> </dependencies>
--- a/src/test/java/de/intevation/lada/LadaStammTest.java Thu Nov 12 12:19:34 2015 +0100 +++ b/src/test/java/de/intevation/lada/LadaStammTest.java Thu Nov 12 12:20:12 2015 +0100 @@ -29,11 +29,11 @@ import org.junit.Assert; import org.junit.BeforeClass; import org.junit.FixMethodOrder; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.MethodSorters; +import de.intevation.lada.BaseTest; import de.intevation.lada.test.stamm.Stammdaten; @@ -231,11 +231,9 @@ stammdatenTest.getById(baseUrl, "verwaltungseinheit", "09575134", testProtocol); } - //TODO: The location tests fail as there is no authentication information - //available for the server. - //The location service is moved to the "land"-services in future version. + /* TODO: The location service is moved to the "land"-services in + future version. */ @Test - @Ignore @RunAsClient public final void testLocation1CreateService(@ArquillianResource URL baseUrl) throws Exception { @@ -259,8 +257,10 @@ "\"verwaltungseinheitId\":\"06611000\",\"otyp\":\"Z\"," + "\"koordinatenartId\":5}"; - Response response = target.request().post( - Entity.entity(newObj, MediaType.APPLICATION_JSON)); + Response response = target.request() + .header("X-SHIB-user", BaseTest.TEST_USER) + .header("X-SHIB-roles", BaseTest.TEST_ROLES) + .post(Entity.entity(newObj, MediaType.APPLICATION_JSON)); String entity = response.readEntity(String.class); /* Try to parse the response*/ JsonReader fromServiceReader = @@ -289,7 +289,6 @@ * @param baseUrl The url pointing to the test deployment. */ @Test - @Ignore @RunAsClient public final void testLocation2UpdateService(@ArquillianResource URL baseUrl) throws Exception { @@ -306,7 +305,10 @@ client.target(baseUrl + "location/" + createdOrtId); prot.addInfo("locationId", createdOrtId); /* Request a kommentar with the id saved when created a kommentar*/ - Response response = target.request().get(); + Response response = target.request() + .header("X-SHIB-user", BaseTest.TEST_USER) + .header("X-SHIB-roles", BaseTest.TEST_ROLES) + .get(); String entity = response.readEntity(String.class); /* Try to parse the response*/ JsonReader reader = Json.createReader(new StringReader(entity)); @@ -319,8 +321,10 @@ prot.addInfo("updated to", "Neuerer Ort"); /* Send the updated kommentar via put reauest*/ WebTarget putTarget = client.target(baseUrl + "location/" + createdOrtId); - Response updated = putTarget.request().put( - Entity.entity(updatedEntity, MediaType.APPLICATION_JSON)); + Response updated = putTarget.request() + .header("X-SHIB-user", BaseTest.TEST_USER) + .header("X-SHIB-roles", BaseTest.TEST_ROLES) + .put(Entity.entity(updatedEntity, MediaType.APPLICATION_JSON)); /* Try to parse the response*/ JsonReader updatedReader = Json.createReader( new StringReader(updated.readEntity(String.class))); @@ -341,7 +345,6 @@ } @Test - @Ignore @RunAsClient public final void testLocation3DeleteService(@ArquillianResource URL baseUrl) throws Exception { @@ -358,7 +361,10 @@ client.target(baseUrl + "location/" + createdOrtId); prot.addInfo("locationId", createdOrtId); /* Delete the object with the saved id*/ - Response response = target.request().delete(); + Response response = target.request() + .header("X-SHIB-user", BaseTest.TEST_USER) + .header("X-SHIB-roles", BaseTest.TEST_ROLES) + .delete(); String entity = response.readEntity(String.class); /* Try to parse the response*/ JsonReader reader = Json.createReader(new StringReader(entity));