Dev configuration management

This commit is contained in:
Fabio Sinibaldi 2022-03-22 18:07:34 +01:00
parent 7f48262034
commit a7825b7baa
5 changed files with 26 additions and 6 deletions

View File

@ -35,7 +35,7 @@
<dependency>
<groupId>org.gcube.distribution</groupId>
<artifactId>gcube-smartgears-bom</artifactId>
<version>2.1.1</version>
<version>${gcube-smartgears-bom-version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

View File

@ -1,6 +1,7 @@
package org.gcube.application.geoportal.service;
import org.gcube.application.geoportal.common.rest.InterfaceConstants;
import org.gcube.application.geoportal.common.utils.tests.GCubeTest;
import org.gcube.application.geoportal.service.profiledDocuments.AbstractProfiledDocumentsTests;
import org.junit.Test;
@ -8,6 +9,7 @@ import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.Response;
import static org.junit.Assert.assertEquals;
import static org.junit.Assume.assumeTrue;
public class InexistentUseCaseDescriptorTests extends AbstractProfiledDocumentsTests {
@ -20,6 +22,7 @@ public class InexistentUseCaseDescriptorTests extends AbstractProfiledDocumentsT
// GET
@Test
public void testMissingProfile(){
assumeTrue(GCubeTest.isTestInfrastructureEnabled());
Response resp = target(InterfaceConstants.Methods.PROJECTS)
.path("non-existent-useCaseDescriptor").request().get();
assertEquals(404,resp.getStatus());

View File

@ -41,6 +41,7 @@ public class LockTests extends BasicServiceTestUnit {
@Test
public void testLocking() throws StepException, EventException, IOException, ProjectLockedException, ProjectNotFoundException, InvalidLockException {
assumeTrue(GCubeTest.isTestInfrastructureEnabled());
Project p = manager.registerNew(new Document("dummyField","dummyValue"));
// lock
p= manager.lock(p.getId(),"Testing");
@ -77,6 +78,7 @@ public class LockTests extends BasicServiceTestUnit {
@Test
public void testUnlock() throws StepException, EventException, IOException, ProjectNotFoundException, ProjectLockedException, InvalidLockException, DeletionException, ConfigurationException, StorageHubException, StorageException {
assumeTrue(GCubeTest.isTestInfrastructureEnabled());
MongoManagerI<Project> managerInterface = manager;
// create
Project p = managerInterface.registerNew(new Document("dummyField","dummyValue"));

View File

@ -37,7 +37,7 @@ public class DummyProjectTest extends AbstractProfiledDocumentsTests{
@Test
public void registerNew() throws Exception {
assumeTrue(GCubeTest.isTestInfrastructureEnabled());
Project doc = createNew(new Document("field","value"));
assertTrue(doc.getTheDocument().containsKey("field"));
@ -47,6 +47,7 @@ public class DummyProjectTest extends AbstractProfiledDocumentsTests{
@Test
public void edit() throws Exception {
assumeTrue(GCubeTest.isTestInfrastructureEnabled());
Project doc=createNew(new Document());
String beforeJson=doc.getTheDocument().toJson();
doc.getTheDocument().put("someStrangeField","someOtherRandomValue");
@ -59,7 +60,7 @@ public class DummyProjectTest extends AbstractProfiledDocumentsTests{
@Test
public void testUploadFileSet() throws Exception {
assumeTrue(GCubeTest.isTestInfrastructureEnabled());
Document baseDoc=new Document();
baseDoc.put("relazioneScavo",new Document("title","My Title"));

20
pom.xml
View File

@ -20,6 +20,20 @@
<geoAPI-version>3.0.1</geoAPI-version>
<distroDirectory>distro</distroDirectory>
<gitBaseUrl>https://code-repo.d4science.org/gCubeSystem</gitBaseUrl>
<!-- prod -->
<!-- <gcube-bom-version>2.0.2</gcube-bom-version>
<gcube-smartgears-bom-version>2.1.1</gcube-smartgears-bom-version>
<gcube-portal-bom-version>3.6.3</gcube-portal-bom-version>
<storagehub-version-range>[1.0.0,2.0.0-SNAPSHOT)</storagehub-version-range>
-->
<!--dev -->
<gcube-bom-version>2.1.0-SNAPSHOT</gcube-bom-version>
<gcube-smartgears-bom-version>2.2.0-SNAPSHOT</gcube-smartgears-bom-version>
<gcube-portal-bom-version>3.7.0-SNAPSHOT</gcube-portal-bom-version>
<storagehub-version-range>[2.0.0,3.0.0-SNAPSHOT)</storagehub-version-range>
</properties>
@ -71,7 +85,7 @@
<dependency>
<groupId>org.gcube.distribution</groupId>
<artifactId>gcube-bom</artifactId>
<version>2.0.2</version>
<version>${gcube-bom-version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@ -79,7 +93,7 @@
<dependency>
<groupId>org.gcube.distribution</groupId>
<artifactId>gcube-smartgears-bom</artifactId>
<version>2.1.1</version>
<version>${gcube-smartgears-bom-version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@ -206,7 +220,7 @@
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>storagehub-client-library</artifactId>
<version>[1.0.0,2.0.0-SNAPSHOT)</version>
<version>${storagehub-version-range}</version>
</dependency>