#22461 #1
|
@ -4,6 +4,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
|
||||
## [v1.0.8-SNAPSHOT] 2021-09-20
|
||||
Logging
|
||||
Fixes [#22193](https://support.d4science.org/issues/22193)
|
||||
|
||||
## [v1.0.6] 2021-09-20
|
||||
Refactored repositories
|
||||
|
|
|
@ -405,6 +405,8 @@ public class ConcessioniMongoManager extends MongoManager{
|
|||
((LayerConcessione) c).setBbox(null);
|
||||
((LayerConcessione) c).setWmsLink(null);
|
||||
((LayerConcessione) c).setWorkspace(null);
|
||||
((LayerConcessione) c).setLayerName(null);
|
||||
|
||||
|
||||
//Remove reference to removed content
|
||||
c.getActualContent().removeAll(toRemove);
|
||||
|
|
|
@ -19,9 +19,9 @@ public class BasicServiceTestUnit extends JerseyTest {
|
|||
return new GeoPortalService();
|
||||
}
|
||||
|
||||
// protected static String scope="/gcube/devsec/devVRE";
|
||||
protected static String scope="/gcube/devsec/devVRE";
|
||||
// protected static String scope="/pred4s/preprod/preVRE";
|
||||
protected static String scope="/d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype";
|
||||
// protected static String scope="/d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype";
|
||||
@BeforeClass
|
||||
public static void init() {
|
||||
|
||||
|
|
|
@ -88,6 +88,7 @@ public class ConcessioniOverMongoTest extends BasicServiceTestUnit{
|
|||
return check(resp,Concessione.class);
|
||||
}
|
||||
|
||||
|
||||
private static Concessione register(WebTarget target, Concessione c) throws Exception {
|
||||
Response resp=target.request(MediaType.APPLICATION_JSON).post(Entity.entity(Serialization.write(c), MediaType.APPLICATION_JSON));
|
||||
return check(resp,Concessione.class);
|
||||
|
@ -143,13 +144,12 @@ public class ConcessioniOverMongoTest extends BasicServiceTestUnit{
|
|||
public void query() throws Exception {
|
||||
WebTarget target=target(PATH);
|
||||
|
||||
Iterator<Concessione> it=null;
|
||||
it=queryFile("lastRegistered.json", target);
|
||||
assertTrue(count(it)==1);
|
||||
Iterator<Concessione> it = queryFile("lastRegistered.json", target);
|
||||
assertEquals(1, count(it));
|
||||
|
||||
|
||||
it=queryFile("firstRegistered.json", target);
|
||||
assertTrue(count(it)==1);
|
||||
assertEquals(1, count(it));
|
||||
|
||||
System.out.println("Last Names by Fabio : ");
|
||||
queryFile("lastNameRegisteredByFabio.json", target, JSONObject.class).forEachRemaining(c -> {System.out.println(c);});
|
||||
|
@ -191,8 +191,8 @@ public class ConcessioniOverMongoTest extends BasicServiceTestUnit{
|
|||
@Test
|
||||
public void republish() throws Exception{
|
||||
WebTarget target=target(PATH);
|
||||
// Concessione published=getFullPublished(target);
|
||||
Concessione published=getById(target,"6155ba6002ad3d2c23b72b5a");
|
||||
Concessione published=getFullPublished(target);
|
||||
//Concessione published=getById(target,"6155ba6002ad3d2c23b72b5a");
|
||||
published = unpublish(target,published.getMongo_id());
|
||||
System.out.println("Republishing..");
|
||||
published=publish(target,published.getMongo_id());
|
||||
|
@ -271,10 +271,8 @@ public class ConcessioniOverMongoTest extends BasicServiceTestUnit{
|
|||
System.out.println("Error for deletion is "+resp.readEntity(String.class));
|
||||
|
||||
//unpublish
|
||||
resp=
|
||||
target.path(InterfaceConstants.Methods.PUBLISH_PATH).path(published.getMongo_id()).
|
||||
request(MediaType.APPLICATION_JSON).delete();
|
||||
check(resp,null);
|
||||
|
||||
unpublish(target,published.getMongo_id());
|
||||
|
||||
//Actually cleaning posizionamento
|
||||
published=check(
|
||||
|
|
Loading…
Reference in New Issue