From e0fa9185ebc7f008a0b0177da45c507ffd6ebc36 Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Tue, 12 Nov 2024 10:41:58 +0100 Subject: [PATCH] passed to jdk11 and gcube-bom 4 --- CHANGELOG.md | 1 + pom.xml | 4 ++-- .../storageclient/wrapper/Configuration.java | 8 ++++---- .../wrapper/ISClientConnector.java | 2 +- .../storageclient/wrapper/StorageClient.java | 20 +++++++++---------- .../storageclient/test/CopyDirTest.java | 2 +- .../storageclient/test/CopyTest.java | 2 +- .../storageclient/test/CountingTest.java | 2 +- .../storageclient/test/DownloadsTest.java | 2 +- .../storageclient/test/DuplicateTest.java | 2 +- .../storageclient/test/ForceCloseTest.java | 2 +- .../storageclient/test/FwsQueryTest.java | 2 +- .../storageclient/test/GetMetaFileTest.java | 2 +- .../storageclient/test/HLcheckTest.java | 2 +- .../storageclient/test/ICSecret.java | 5 ++++- .../storageclient/test/LinkTest.java | 2 +- .../storageclient/test/LockTest.java | 2 +- .../storageclient/test/MoveDirTest.java | 2 +- .../storageclient/test/MoveTest.java | 2 +- .../storageclient/test/PropertiesTest.java | 2 +- .../storageclient/test/RemoveTest.java | 2 +- .../test/RemoveVolatileArea.java | 2 +- .../storageclient/test/ReplaceFileTest.java | 2 +- .../storageclient/test/SoftCopyTest.java | 2 +- .../storageclient/test/UploadsTest.java | 2 +- .../test/UrlResolverByIdTest.java | 2 +- .../storageclient/test/UrlResolverTest.java | 2 +- 27 files changed, 43 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d239b0f..70c5913 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * moved version from 3.1.0-SNAPSHOT to 4.0.0-SNAPSHOT * upgrade to gcube-bom 3 and ScopeProvider removed * removed environment variable scope + * passed to jdk11 and gcube-bom 4.0 ## [v3.0.1-SNAPSHOT] * removed http protocol; diff --git a/pom.xml b/pom.xml index 252e830..92d42f2 100644 --- a/pom.xml +++ b/pom.xml @@ -16,8 +16,8 @@ ${project.basedir}/distro - 1.8 - 1.8 + 11 + 11 diff --git a/src/main/java/org/gcube/contentmanager/storageclient/wrapper/Configuration.java b/src/main/java/org/gcube/contentmanager/storageclient/wrapper/Configuration.java index b5f52e9..d120b8b 100644 --- a/src/main/java/org/gcube/contentmanager/storageclient/wrapper/Configuration.java +++ b/src/main/java/org/gcube/contentmanager/storageclient/wrapper/Configuration.java @@ -107,7 +107,7 @@ public class Configuration { public void getConfiguration(){ String[] newServer=null; String currentScope; - currentScope = SecretManagerProvider.instance.get().getContext(); + currentScope = SecretManagerProvider.get().getContext(); logger.debug("Scope found on ScopeProvider instance is "+currentScope); logger.debug("Manually scope was set to"+RRScope+" it doesn't take effect"); //if a specific backend is not passed as input param then take the default one @@ -206,7 +206,7 @@ public class Configuration { private String getHomeLibraryContext(){ String area=null; - String scope= SecretManagerProvider.instance.get().getContext(); + String scope= SecretManagerProvider.get().getContext(); String context=null; if (scope.startsWith("/gcube")) context= HL_CONTEXT_DEV; @@ -368,7 +368,7 @@ public class Configuration { @Deprecated public String retrieveEncryptionPhrase() throws Exception { - String currentScope=SecretManagerProvider.instance.get().getContext(); + String currentScope=SecretManagerProvider.get().getContext(); logger.debug("retrieve encryption prhase on scope: "+currentScope); String encryptedKey=null; // ISClientConnector isclient=getISClient(); @@ -380,7 +380,7 @@ public class Configuration { } public String retrieveEncryptionField(String fieldName) throws Exception { - String currentScope=SecretManagerProvider.instance.get().getContext(); + String currentScope=SecretManagerProvider.get().getContext(); logger.debug("retrieve encryption prhase on scope: "+currentScope); String encryptedKey=null; // ISClientConnector isclient=getISClient(); diff --git a/src/main/java/org/gcube/contentmanager/storageclient/wrapper/ISClientConnector.java b/src/main/java/org/gcube/contentmanager/storageclient/wrapper/ISClientConnector.java index 0d3f9bf..56a3045 100644 --- a/src/main/java/org/gcube/contentmanager/storageclient/wrapper/ISClientConnector.java +++ b/src/main/java/org/gcube/contentmanager/storageclient/wrapper/ISClientConnector.java @@ -82,7 +82,7 @@ public class ISClientConnector { setStorageResource(storageResource); return storageResource; }else - throw new RuntimeException("Storage ServiceEndpoint not found under scope: "+SecretManagerProvider.instance.get().getContext()); + throw new RuntimeException("Storage ServiceEndpoint not found under scope: "+SecretManagerProvider.get().getContext()); }else{ logger.debug("service endpoint already discovered"); return getStorageResource(); diff --git a/src/main/java/org/gcube/contentmanager/storageclient/wrapper/StorageClient.java b/src/main/java/org/gcube/contentmanager/storageclient/wrapper/StorageClient.java index 4be9e84..51531f1 100644 --- a/src/main/java/org/gcube/contentmanager/storageclient/wrapper/StorageClient.java +++ b/src/main/java/org/gcube/contentmanager/storageclient/wrapper/StorageClient.java @@ -53,7 +53,7 @@ public class StorageClient { public StorageClient(String serviceClass, String serviceName, String owner, AccessType accessType){ String id=owner; this.owner=owner; - this.scopeString=SecretManagerProvider.instance.get().getContext(); + this.scopeString=SecretManagerProvider.get().getContext(); if(accessType!=null) this.typeAccess=accessType; else throw new RuntimeException("AccessType parameter must be not null"); @@ -77,7 +77,7 @@ public class StorageClient { public StorageClient(String serviceClass, String serviceName, String owner, AccessType accessType, BackendType backend){; String id=owner; this.owner=owner; - this.scopeString=SecretManagerProvider.instance.get().getContext(); + this.scopeString=SecretManagerProvider.get().getContext(); if(accessType!=null) this.typeAccess=accessType; else throw new RuntimeException("AccessType parameter must be not null"); @@ -100,7 +100,7 @@ public class StorageClient { public StorageClient(String owner, AccessType accessType, MemoryType memory){ String id=owner; this.owner=owner; - this.scopeString=SecretManagerProvider.instance.get().getContext(); + this.scopeString=SecretManagerProvider.get().getContext(); if(accessType!=null) this.typeAccess=accessType; else throw new RuntimeException("AccessType parameter must be not null"); @@ -124,7 +124,7 @@ public class StorageClient { public StorageClient(String serviceClass, String serviceName, String owner, String server, AccessType accessType){ String id=owner; this.owner=owner; - this.scopeString=SecretManagerProvider.instance.get().getContext(); + this.scopeString=SecretManagerProvider.get().getContext(); if(accessType!=null) this.typeAccess=accessType; else throw new RuntimeException("AccessType parameter must be not null"); @@ -148,7 +148,7 @@ public class StorageClient { public StorageClient(String serviceClass, String serviceName, String owner, AccessType accessType, MemoryType memory){ String id=owner; this.owner=owner; - this.scopeString=SecretManagerProvider.instance.get().getContext(); + this.scopeString=SecretManagerProvider.get().getContext(); if(accessType!=null) this.typeAccess=accessType; else throw new RuntimeException("AccessType parameter must be not null"); @@ -174,7 +174,7 @@ public class StorageClient { public StorageClient(String serviceClass, String serviceName, String owner, AccessType accessType, MemoryType memory, BackendType backend){ String id=owner; this.owner=owner; - this.scopeString=SecretManagerProvider.instance.get().getContext(); + this.scopeString=SecretManagerProvider.get().getContext(); if(accessType!=null) this.typeAccess=accessType; else throw new RuntimeException("AccessType parameter must be not null"); @@ -201,7 +201,7 @@ public class StorageClient { public StorageClient(String serviceClass, String serviceName, String owner, AccessType accessType, MemoryType memory, String server){ String id=owner; this.owner=owner; - this.scopeString=SecretManagerProvider.instance.get().getContext(); + this.scopeString=SecretManagerProvider.get().getContext(); if(accessType!=null) this.typeAccess=accessType; else throw new RuntimeException("AccessType parameter must be not null"); @@ -243,12 +243,12 @@ public class StorageClient { } if(getMemoryType() !=null) engine.setGcubeMemoryType(getMemoryType().toString()); - engine.setGcubeScope(SecretManagerProvider.instance.get().getContext()); + engine.setGcubeScope(SecretManagerProvider.get().getContext()); engine.setOwnerGcube(owner); cfg.getOptionalPropertiesFromRR(engine); if(getCurrentScope()!=null){ - if(!getCurrentScope().equals(SecretManagerProvider.instance.get().getContext())) - logger.warn("scope force to "+getCurrentScope()+"doesn't take effect. The current scope is set to"+SecretManagerProvider.instance.get().getContext()); + if(!getCurrentScope().equals(SecretManagerProvider.get().getContext())) + logger.warn("scope force to "+getCurrentScope()+"doesn't take effect. The current scope is set to"+SecretManagerProvider.get().getContext()); } return engine; } diff --git a/src/test/java/org/gcube/contentmanager/storageclient/test/CopyDirTest.java b/src/test/java/org/gcube/contentmanager/storageclient/test/CopyDirTest.java index 93b45df..b5d1206 100644 --- a/src/test/java/org/gcube/contentmanager/storageclient/test/CopyDirTest.java +++ b/src/test/java/org/gcube/contentmanager/storageclient/test/CopyDirTest.java @@ -37,7 +37,7 @@ public class CopyDirTest { @BeforeClass public static void getClient() throws RemoteBackendException{ - SecretManagerProvider.instance.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); + SecretManagerProvider.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); try { diff --git a/src/test/java/org/gcube/contentmanager/storageclient/test/CopyTest.java b/src/test/java/org/gcube/contentmanager/storageclient/test/CopyTest.java index 5af26bf..21cb9e8 100644 --- a/src/test/java/org/gcube/contentmanager/storageclient/test/CopyTest.java +++ b/src/test/java/org/gcube/contentmanager/storageclient/test/CopyTest.java @@ -39,7 +39,7 @@ public class CopyTest { @Before public void getClient() throws RemoteBackendException{ - SecretManagerProvider.instance.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); + SecretManagerProvider.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); try { client=new StorageClient(serviceClass, serviceName, owner, AccessType.SHARED, DEFAULT_MEMORY_TYPE).getClient(); assertNotNull(client); diff --git a/src/test/java/org/gcube/contentmanager/storageclient/test/CountingTest.java b/src/test/java/org/gcube/contentmanager/storageclient/test/CountingTest.java index 24b7e8c..f8fefe3 100644 --- a/src/test/java/org/gcube/contentmanager/storageclient/test/CountingTest.java +++ b/src/test/java/org/gcube/contentmanager/storageclient/test/CountingTest.java @@ -26,7 +26,7 @@ public class CountingTest { @Before public void getClient() throws RemoteBackendException{ - SecretManagerProvider.instance.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); + SecretManagerProvider.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); try { client=new StorageClient(serviceClass, serviceName, owner, AccessType.PUBLIC, Costants.DEFAULT_MEMORY_TYPE).getClient(); assertNotNull(client); diff --git a/src/test/java/org/gcube/contentmanager/storageclient/test/DownloadsTest.java b/src/test/java/org/gcube/contentmanager/storageclient/test/DownloadsTest.java index 36f3886..8e840f4 100644 --- a/src/test/java/org/gcube/contentmanager/storageclient/test/DownloadsTest.java +++ b/src/test/java/org/gcube/contentmanager/storageclient/test/DownloadsTest.java @@ -42,7 +42,7 @@ public class DownloadsTest { @BeforeClass public static void getClient() throws RemoteBackendException{ - SecretManagerProvider.instance.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); + SecretManagerProvider.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); // ScopeProvider.instance.set(scope); try { client=new StorageClient(serviceClass, serviceName, owner, AccessType.SHARED, Costants.DEFAULT_MEMORY_TYPE, Costants.BACKEND_TYPE).getClient(); diff --git a/src/test/java/org/gcube/contentmanager/storageclient/test/DuplicateTest.java b/src/test/java/org/gcube/contentmanager/storageclient/test/DuplicateTest.java index d18e74d..e567e8b 100644 --- a/src/test/java/org/gcube/contentmanager/storageclient/test/DuplicateTest.java +++ b/src/test/java/org/gcube/contentmanager/storageclient/test/DuplicateTest.java @@ -43,7 +43,7 @@ public class DuplicateTest { @Before public void getClient() throws RemoteBackendException{ - SecretManagerProvider.instance.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); + SecretManagerProvider.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); try { client=new StorageClient(serviceClass, serviceName, owner, AccessType.SHARED, Costants.DEFAULT_MEMORY_TYPE).getClient(); diff --git a/src/test/java/org/gcube/contentmanager/storageclient/test/ForceCloseTest.java b/src/test/java/org/gcube/contentmanager/storageclient/test/ForceCloseTest.java index 973591b..8637b31 100644 --- a/src/test/java/org/gcube/contentmanager/storageclient/test/ForceCloseTest.java +++ b/src/test/java/org/gcube/contentmanager/storageclient/test/ForceCloseTest.java @@ -37,7 +37,7 @@ public class ForceCloseTest { @Before public void getClient(){ - SecretManagerProvider.instance.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); + SecretManagerProvider.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); try { client=new StorageClient(serviceClass, serviceName, owner, AccessType.SHARED, Costants.DEFAULT_MEMORY_TYPE).getClient(); assertNotNull(client); diff --git a/src/test/java/org/gcube/contentmanager/storageclient/test/FwsQueryTest.java b/src/test/java/org/gcube/contentmanager/storageclient/test/FwsQueryTest.java index 754a776..457de7f 100644 --- a/src/test/java/org/gcube/contentmanager/storageclient/test/FwsQueryTest.java +++ b/src/test/java/org/gcube/contentmanager/storageclient/test/FwsQueryTest.java @@ -27,7 +27,7 @@ public class FwsQueryTest { @Before public void setscope(){ - SecretManagerProvider.instance.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING));; + SecretManagerProvider.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING));; } // @Test diff --git a/src/test/java/org/gcube/contentmanager/storageclient/test/GetMetaFileTest.java b/src/test/java/org/gcube/contentmanager/storageclient/test/GetMetaFileTest.java index c0da733..1076ba6 100644 --- a/src/test/java/org/gcube/contentmanager/storageclient/test/GetMetaFileTest.java +++ b/src/test/java/org/gcube/contentmanager/storageclient/test/GetMetaFileTest.java @@ -36,7 +36,7 @@ public class GetMetaFileTest { @BeforeClass public static void getClient() throws RemoteBackendException{ - SecretManagerProvider.instance.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); + SecretManagerProvider.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); try { client=new StorageClient(serviceClass, serviceName, owner, AccessType.PUBLIC, Costants.DEFAULT_MEMORY_TYPE).getClient(); assertNotNull(client); diff --git a/src/test/java/org/gcube/contentmanager/storageclient/test/HLcheckTest.java b/src/test/java/org/gcube/contentmanager/storageclient/test/HLcheckTest.java index f171ce1..fd698be 100644 --- a/src/test/java/org/gcube/contentmanager/storageclient/test/HLcheckTest.java +++ b/src/test/java/org/gcube/contentmanager/storageclient/test/HLcheckTest.java @@ -37,7 +37,7 @@ public class HLcheckTest { @Before public void getClient() throws RemoteBackendException{ - SecretManagerProvider.instance.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); + SecretManagerProvider.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); // ScopeProvider.instance.set(scope); try { client=new StorageClient(serviceClass, serviceName, owner, AccessType.SHARED).getClient(); diff --git a/src/test/java/org/gcube/contentmanager/storageclient/test/ICSecret.java b/src/test/java/org/gcube/contentmanager/storageclient/test/ICSecret.java index 04671dc..a799c16 100644 --- a/src/test/java/org/gcube/contentmanager/storageclient/test/ICSecret.java +++ b/src/test/java/org/gcube/contentmanager/storageclient/test/ICSecret.java @@ -16,7 +16,7 @@ public class ICSecret extends Secret{ @Override public Owner getOwner() { - return new Owner("guest", Collections.emptyList(), false); + return null; } @Override @@ -34,5 +34,8 @@ public class ICSecret extends Secret{ return false; } + @Override + public boolean isValid(){ return true; } + } \ No newline at end of file diff --git a/src/test/java/org/gcube/contentmanager/storageclient/test/LinkTest.java b/src/test/java/org/gcube/contentmanager/storageclient/test/LinkTest.java index cac2889..3c492f2 100644 --- a/src/test/java/org/gcube/contentmanager/storageclient/test/LinkTest.java +++ b/src/test/java/org/gcube/contentmanager/storageclient/test/LinkTest.java @@ -32,7 +32,7 @@ public class LinkTest { @Before public void getClient() throws RemoteBackendException{ - SecretManagerProvider.instance.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); + SecretManagerProvider.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); try { client=new StorageClient(serviceClass, serviceName, owner, AccessType.SHARED, Costants.DEFAULT_MEMORY_TYPE).getClient(); diff --git a/src/test/java/org/gcube/contentmanager/storageclient/test/LockTest.java b/src/test/java/org/gcube/contentmanager/storageclient/test/LockTest.java index cb43189..53473cb 100644 --- a/src/test/java/org/gcube/contentmanager/storageclient/test/LockTest.java +++ b/src/test/java/org/gcube/contentmanager/storageclient/test/LockTest.java @@ -38,7 +38,7 @@ public class LockTest { @Before public void getClient(){ - SecretManagerProvider.instance.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); + SecretManagerProvider.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); try { client=new StorageClient(serviceClass, serviceName, owner, AccessType.SHARED, Costants.DEFAULT_MEMORY_TYPE).getClient(); assertNotNull(client); diff --git a/src/test/java/org/gcube/contentmanager/storageclient/test/MoveDirTest.java b/src/test/java/org/gcube/contentmanager/storageclient/test/MoveDirTest.java index 7762404..31093cc 100644 --- a/src/test/java/org/gcube/contentmanager/storageclient/test/MoveDirTest.java +++ b/src/test/java/org/gcube/contentmanager/storageclient/test/MoveDirTest.java @@ -34,7 +34,7 @@ public class MoveDirTest { @BeforeClass public static void getClient() throws RemoteBackendException{ - SecretManagerProvider.instance.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); + SecretManagerProvider.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); try { client=new StorageClient(serviceClass, serviceName, owner, AccessType.SHARED, Costants.DEFAULT_MEMORY_TYPE).getClient(); diff --git a/src/test/java/org/gcube/contentmanager/storageclient/test/MoveTest.java b/src/test/java/org/gcube/contentmanager/storageclient/test/MoveTest.java index a66164c..ce92e15 100644 --- a/src/test/java/org/gcube/contentmanager/storageclient/test/MoveTest.java +++ b/src/test/java/org/gcube/contentmanager/storageclient/test/MoveTest.java @@ -30,7 +30,7 @@ public class MoveTest { @Before public void getClient() throws RemoteBackendException{ - SecretManagerProvider.instance.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); + SecretManagerProvider.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); try { client=new StorageClient(serviceClass, serviceName, owner, AccessType.SHARED, Costants.DEFAULT_MEMORY_TYPE).getClient(); diff --git a/src/test/java/org/gcube/contentmanager/storageclient/test/PropertiesTest.java b/src/test/java/org/gcube/contentmanager/storageclient/test/PropertiesTest.java index 3ae700b..634a865 100644 --- a/src/test/java/org/gcube/contentmanager/storageclient/test/PropertiesTest.java +++ b/src/test/java/org/gcube/contentmanager/storageclient/test/PropertiesTest.java @@ -35,7 +35,7 @@ public class PropertiesTest { @BeforeClass public static void getClient() throws RemoteBackendException{ - SecretManagerProvider.instance.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); + SecretManagerProvider.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); try { client=new StorageClient(serviceClass, serviceName, owner, AccessType.PUBLIC, Costants.DEFAULT_MEMORY_TYPE).getClient(); assertNotNull(client); diff --git a/src/test/java/org/gcube/contentmanager/storageclient/test/RemoveTest.java b/src/test/java/org/gcube/contentmanager/storageclient/test/RemoveTest.java index 343d130..9c966d9 100644 --- a/src/test/java/org/gcube/contentmanager/storageclient/test/RemoveTest.java +++ b/src/test/java/org/gcube/contentmanager/storageclient/test/RemoveTest.java @@ -33,7 +33,7 @@ public class RemoveTest { @Before public void getClient() throws RemoteBackendException{ - SecretManagerProvider.instance.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); + SecretManagerProvider.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); try { client=new StorageClient(serviceClass, serviceName, owner, AccessType.SHARED, Costants.DEFAULT_MEMORY_TYPE).getClient(); assertNotNull(client); diff --git a/src/test/java/org/gcube/contentmanager/storageclient/test/RemoveVolatileArea.java b/src/test/java/org/gcube/contentmanager/storageclient/test/RemoveVolatileArea.java index 16bde67..b9ca83f 100644 --- a/src/test/java/org/gcube/contentmanager/storageclient/test/RemoveVolatileArea.java +++ b/src/test/java/org/gcube/contentmanager/storageclient/test/RemoveVolatileArea.java @@ -33,7 +33,7 @@ public class RemoveVolatileArea { @Before public void getClient() throws RemoteBackendException{ - SecretManagerProvider.instance.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); + SecretManagerProvider.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); try { client=new StorageClient(serviceClass, serviceName, owner, AccessType.SHARED, Costants.DEFAULT_MEMORY_TYPE).getClient(); assertNotNull(client); diff --git a/src/test/java/org/gcube/contentmanager/storageclient/test/ReplaceFileTest.java b/src/test/java/org/gcube/contentmanager/storageclient/test/ReplaceFileTest.java index eb8a089..50553d0 100644 --- a/src/test/java/org/gcube/contentmanager/storageclient/test/ReplaceFileTest.java +++ b/src/test/java/org/gcube/contentmanager/storageclient/test/ReplaceFileTest.java @@ -44,7 +44,7 @@ public class ReplaceFileTest { @Before public void getClient(){ - SecretManagerProvider.instance.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); + SecretManagerProvider.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); try { client=new StorageClient(serviceClass, serviceName, owner, AccessType.SHARED, Costants.DEFAULT_MEMORY_TYPE).getClient(); assertNotNull(client); diff --git a/src/test/java/org/gcube/contentmanager/storageclient/test/SoftCopyTest.java b/src/test/java/org/gcube/contentmanager/storageclient/test/SoftCopyTest.java index 57fefa3..1ca03ca 100644 --- a/src/test/java/org/gcube/contentmanager/storageclient/test/SoftCopyTest.java +++ b/src/test/java/org/gcube/contentmanager/storageclient/test/SoftCopyTest.java @@ -47,7 +47,7 @@ public class SoftCopyTest { @BeforeClass public static void getClient() throws RemoteBackendException{ - SecretManagerProvider.instance.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); + SecretManagerProvider.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); try { client=new StorageClient(serviceClass, serviceName, owner, AccessType.SHARED, Costants.DEFAULT_MEMORY_TYPE).getClient(); diff --git a/src/test/java/org/gcube/contentmanager/storageclient/test/UploadsTest.java b/src/test/java/org/gcube/contentmanager/storageclient/test/UploadsTest.java index 7e926db..cc4ac74 100644 --- a/src/test/java/org/gcube/contentmanager/storageclient/test/UploadsTest.java +++ b/src/test/java/org/gcube/contentmanager/storageclient/test/UploadsTest.java @@ -39,7 +39,7 @@ public class UploadsTest { @BeforeClass public static void getClient(){ - SecretManagerProvider.instance.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); + SecretManagerProvider.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); try { client=new StorageClient(serviceClass, serviceName, owner, AccessType.SHARED, Costants.DEFAULT_MEMORY_TYPE).getClient(); assertNotNull(client); diff --git a/src/test/java/org/gcube/contentmanager/storageclient/test/UrlResolverByIdTest.java b/src/test/java/org/gcube/contentmanager/storageclient/test/UrlResolverByIdTest.java index 831e14e..9085751 100644 --- a/src/test/java/org/gcube/contentmanager/storageclient/test/UrlResolverByIdTest.java +++ b/src/test/java/org/gcube/contentmanager/storageclient/test/UrlResolverByIdTest.java @@ -43,7 +43,7 @@ public class UrlResolverByIdTest { @Before public void init() throws RemoteBackendException{ - SecretManagerProvider.instance.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); + SecretManagerProvider.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); try { client = new StorageClient(serviceClass, serviceName, owner , AccessType.SHARED, Costants.DEFAULT_MEMORY_TYPE).getClient(); } catch (Exception e) { diff --git a/src/test/java/org/gcube/contentmanager/storageclient/test/UrlResolverTest.java b/src/test/java/org/gcube/contentmanager/storageclient/test/UrlResolverTest.java index 6344806..128e796 100644 --- a/src/test/java/org/gcube/contentmanager/storageclient/test/UrlResolverTest.java +++ b/src/test/java/org/gcube/contentmanager/storageclient/test/UrlResolverTest.java @@ -26,7 +26,7 @@ public class UrlResolverTest { @Before public void init() throws RemoteBackendException{ - SecretManagerProvider.instance.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); + SecretManagerProvider.set(new ICSecret(Costants.DEFAULT_SCOPE_STRING)); try { client = new StorageClient(serviceClass, serviceName, owner , AccessType.SHARED, Costants.DEFAULT_MEMORY_TYPE).getClient(); } catch (Exception e) {