diff --git a/cms-test-commons/pom.xml b/cms-test-commons/pom.xml
index 58c8903..4e21d13 100644
--- a/cms-test-commons/pom.xml
+++ b/cms-test-commons/pom.xml
@@ -62,7 +62,6 @@
junit
junit
- 4.12
diff --git a/geoportal-common/pom.xml b/geoportal-common/pom.xml
index 517a98d..7517504 100644
--- a/geoportal-common/pom.xml
+++ b/geoportal-common/pom.xml
@@ -20,17 +20,17 @@
-
-
-
- org.gcube.distribution
- gcube-bom
- 2.0.1
- pom
- import
-
-
-
+
+
+
+
+
+
+
+
+
+
+
scm:git:${gitBaseUrl}/${project.artifactId}.git
diff --git a/geoportal-service/pom.xml b/geoportal-service/pom.xml
index b026879..eeaa3c6 100644
--- a/geoportal-service/pom.xml
+++ b/geoportal-service/pom.xml
@@ -196,7 +196,6 @@
junit
junit
- 4.11
test
diff --git a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/ConcessioniOverMongoTest.java b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/ConcessioniOverMongoTest.java
index 14e5020..b64d5fd 100644
--- a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/ConcessioniOverMongoTest.java
+++ b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/ConcessioniOverMongoTest.java
@@ -40,7 +40,7 @@ public class ConcessioniOverMongoTest extends BasicServiceTestUnit{
TokenSetter.set(scope);
}
-
+ //Used for local test data
private static Concessione upload(StorageUtils storage, WebTarget target,String id, String path, String ...files) throws Exception {
FileSets.RequestBuilder builder = FileSets.build(path);
@@ -52,6 +52,17 @@ public class ConcessioniOverMongoTest extends BasicServiceTestUnit{
MediaType.APPLICATION_JSON)),Concessione.class);
}
+ //generic
+ private static Concessione upload(StorageUtils storage, WebTarget target,String id, String path, File ...files) throws Exception {
+ FileSets.RequestBuilder builder = FileSets.build(path);
+
+ for(File file:files)
+ builder.add(storage.putOntoStorage(file,file.getName()));
+
+ return check(target.path(FILES_PATH).path(id).request(MediaType.APPLICATION_JSON).
+ post(Entity.entity(Serialization.write(builder.getTheRequest()),
+ MediaType.APPLICATION_JSON)),Concessione.class);
+ }
private static Concessione publish(WebTarget target, Concessione conc) throws Exception {
Response resp=target.path(PUBLISH_PATH).path(conc.getMongo_id()).request(MediaType.APPLICATION_JSON).
@@ -298,12 +309,15 @@ public class ConcessioniOverMongoTest extends BasicServiceTestUnit{
upload(storage,target,c.getMongo_id(),Paths.ABSTRACT_RELAZIONE,"relazione.pdf");
upload(storage,target,c.getMongo_id(),Paths.POSIZIONAMENTO,
- TestModel.getBaseFolder().list((file,name)->{return name.startsWith("pos");}));
-
+// TestModel.getBaseFolder().list((file,name)->{return name.startsWith("pos");}));
+ new File("/Users/fabioisti/Documents/invio_08_05/Montalto di Castro (VT)_Vulci_Indagini non invasive_Doc. paragr._Va/CONSEGNA_WGS84")
+ .listFiles((file,name)->{return name.startsWith("Mag_area");}));
// Clash on workspaces
upload(storage,target,c.getMongo_id(),Paths.piantaByIndex(0),
- TestModel.getBaseFolder().list((file,name)->{return name.startsWith("pianta");}));
+// TestModel.getBaseFolder().list((file,name)->{return name.startsWith("pianta");}));
+ new File("/Users/fabioisti/Documents/invio_08_05/Montalto di Castro (VT)_Vulci_Indagini non invasive_Doc. paragr._Va/CONSEGNA_WGS84")
+ .listFiles((file,name)->{return name.startsWith("Mag_anomalies_WGS84");}));
upload(storage,target,c.getMongo_id(),Paths.imgByIndex(0),"immagine.png");
upload(storage,target,c.getMongo_id(),Paths.imgByIndex(1),"immagine2.png");
diff --git a/pom.xml b/pom.xml
index 33c419c..a022e70 100644
--- a/pom.xml
+++ b/pom.xml
@@ -83,7 +83,17 @@
1.14.8
+
+ org.projectlombok
+ lombok
+ 1.14.8
+
+
+ junit
+ junit
+ 4.11
+