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:
parent
c0895bc2d3
commit
73f65aad08
|
@ -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());
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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" />
|
||||
|
|
Loading…
Reference in New Issue