refs #2197: Remove the use of ScopeProvider if any from accounting-analytics-persistence-couchbase

https://support.d4science.org/issues/2197

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-analytics-persistence-couchbase@124018 82a268e6-3cf1-43bd-a215-b396298e98cf
feature/19115
Luca Frosini 8 years ago
parent c8a656514f
commit 4b36e7ba5f

@ -5,6 +5,7 @@ package org.gcube.accounting.analytics.persistence;
import org.gcube.accounting.analytics.persistence.couchbase.AccountingPersistenceQueryCouchBase;
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
@ -19,8 +20,13 @@ public class AccountingPersistenceQueryConfigurationTest {
private static Logger logger = LoggerFactory.getLogger(AccountingPersistenceQueryConfigurationTest.class);
@Before
public void before() throws Exception{
SecurityTokenProvider.instance.set("");
public void before(){
SecurityTokenProvider.instance.set(TestUtility.TOKEN);
}
@After
public void after(){
SecurityTokenProvider.instance.reset();
}
@Test

@ -41,7 +41,7 @@ public class AccountingPersistenceQueryFactoryTest {
@Before
public void before() throws Exception{
SecurityTokenProvider.instance.set("");
SecurityTokenProvider.instance.set(TestUtility.TOKEN);
apq = AccountingPersistenceBackendQueryFactory.getInstance();
}

@ -0,0 +1,14 @@
/**
*
*/
package org.gcube.accounting.analytics.persistence;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
*
*/
public class TestUtility {
public static final String TOKEN = "";
}