fix hostingNode test case
This commit is contained in:
parent
1b76d204ac
commit
7aba971bf6
|
@ -2,7 +2,7 @@ package org.gcube.informationsystem.icproxy;
|
|||
|
||||
import javax.ws.rs.core.Application;
|
||||
|
||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
//import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
import org.gcube.informationsystem.icproxy.resources.GCoreEndpointResource;
|
||||
import org.gcube.informationsystem.icproxy.resources.GenericResourceResource;
|
||||
|
@ -11,14 +11,13 @@ import org.gcube.informationsystem.icproxy.resources.ICResource;
|
|||
import org.gcube.informationsystem.icproxy.resources.ServiceEndpointResource;
|
||||
import org.glassfish.jersey.server.ResourceConfig;
|
||||
import org.glassfish.jersey.test.JerseyTest;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
public class TestCall extends JerseyTest{
|
||||
|
||||
@Override
|
||||
protected Application configure() {
|
||||
ScopeProvider.instance.set("/gcube/devsec");
|
||||
return new ResourceConfig(ICResource.class,GCoreEndpointResource.class, ServiceEndpointResource.class, HostingNodeResource.class, GenericResourceResource.class);
|
||||
|
||||
}
|
||||
|
@ -39,8 +38,6 @@ public class TestCall extends JerseyTest{
|
|||
|
||||
@Test
|
||||
public void gcoreEndpointWithResult() {
|
||||
|
||||
|
||||
final String ret = target("GCoreEndpoint").path("DataAnalysis")
|
||||
.queryParam("result","/Profile/AccessPoint/RunningInstanceInterfaces//Endpoint[@EntryName/string() eq \"querymanager\"]")
|
||||
.queryParam("scope", "/gcube/devsec").request().get(String.class);
|
||||
|
@ -49,23 +46,18 @@ public class TestCall extends JerseyTest{
|
|||
|
||||
@Test
|
||||
public void serviceEndpoint() {
|
||||
ScopeProvider.instance.set("/gcube/devsec");
|
||||
//SecurityTokenProvider.instance.set("/gcube/devsec");
|
||||
final String ret = target("ServiceEndpoint").path("BiodiversityRepository").path("CatalogueOfLife").queryParam("scope", "/gcube/devsec").request().get(String.class);
|
||||
System.out.println(ret);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void serviceEndpointFree() {
|
||||
ScopeProvider.instance.set("/gcube/devsec");
|
||||
//SecurityTokenProvider.instance.set("/gcube/devsec");
|
||||
final String ret = target("ServiceEndpoint").path("Storage").path("StorageManager").queryParam("decrypt", true).queryParam("scope", "/gcube/devsec").request().get(String.class);
|
||||
System.out.println(ret);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void hostingNode() {
|
||||
ScopeProvider.instance.set("/gcube/devsec");
|
||||
final String ret = target("HostingNode").queryParam("scope", "/gcube/devsec").request().get(String.class);
|
||||
System.out.println(ret);
|
||||
}
|
||||
|
@ -78,7 +70,6 @@ public class TestCall extends JerseyTest{
|
|||
|
||||
@Test
|
||||
public void getById() {
|
||||
ScopeProvider.instance.set("/gcube/devsec");
|
||||
final String ret = target("/").path("aab08cf4-ed27-406c-b4a2-89888300976f").queryParam("scope", "/gcube/devsec").request().get(String.class);
|
||||
System.out.println(ret);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue