Changing the tests

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry-publisher@133912 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2016-11-04 15:51:33 +00:00
parent c0895bc2d3
commit 73f65aad08
5 changed files with 18 additions and 12 deletions

View File

@ -196,7 +196,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
}
connection.setDoOutput(true);
connection.setRequestProperty("Content-type", "text/plain");
connection.setRequestProperty("Content-type", "application/json");
connection.setRequestProperty("User-Agent", ResourceRegistryPublisher.class.getSimpleName());
connection.setRequestMethod(method.toString());

View File

@ -34,16 +34,18 @@ import org.slf4j.LoggerFactory;
/**
* @author Luca Frosini (ISTI - CNR)
*/
public class EntityManagementTest extends ScopedTest {
public class EntityManagementTest {
private static final Logger logger = LoggerFactory.getLogger(EntityManagementTest.class);
protected ResourceRegistryPublisher resourceRegistryPublisher;
@BeforeClass
public void before() throws Exception {
super.before();
public static void beforeClass() throws Exception {
ScopedTest.beforeClass();
}
public EntityManagementTest(){
resourceRegistryPublisher = ResourceRegistryPublisherFactory.create();
}

View File

@ -33,16 +33,20 @@ import org.slf4j.LoggerFactory;
* @author Luca Frosini (ISTI - CNR)
*
*/
public class RRClientTest extends ScopedTest {
public class RRClientTest {
private static final Logger logger = LoggerFactory.getLogger(EntityManagementTest.class);
protected ResourceRegistryPublisher resourceRegistryPublisher;
protected ResourceRegistryClient resourceRegistryClient;
@BeforeClass
public void before() throws Exception {
super.before();
public static void beforeClass() throws Exception {
ScopedTest.beforeClass();
}
public RRClientTest(){
resourceRegistryPublisher = ResourceRegistryPublisherFactory.create();
resourceRegistryClient = ResourceRegistryClientFactory.create();
logger.trace("{} and {} created",

View File

@ -31,13 +31,13 @@ public class ScopedTest {
}
@BeforeClass
public void before() throws Exception{
public static void beforeClass() throws Exception{
SecurityTokenProvider.instance.set(TOKEN);
ScopeProvider.instance.set(getCurrentScope());
}
@AfterClass
public void after() throws Exception{
public static void afterClass() throws Exception{
SecurityTokenProvider.instance.reset();
ScopeProvider.instance.reset();
}

View File

@ -9,8 +9,8 @@
</appender>
<logger name="org.gcube" level="INFO" />
<logger name="org.gcube.informationsystem" level="INFO" />
<logger name="org.gcube" level="WARN" />
<logger name="org.gcube.informationsystem" level="TRACE" />
<root level="WARN">
<appender-ref ref="STDOUT" />