62 lines
1.5 KiB
Java
62 lines
1.5 KiB
Java
package org.gcube.spatial.data.clients;
|
|
|
|
import static org.junit.Assume.assumeTrue;
|
|
|
|
import org.gcube.sdi.test.GCubeSDITest;
|
|
import org.gcube.spatial.data.clients.model.ConnectionDescriptor;
|
|
import org.gcube.spatial.data.clients.model.engine.Engine;
|
|
import org.gcube.spatial.data.sdi.model.faults.RemoteException;
|
|
import org.junit.BeforeClass;
|
|
import org.junit.Test;
|
|
|
|
public class Tests extends GCubeSDITest{
|
|
|
|
|
|
|
|
@Test
|
|
public void testContextAuth() throws Exception {
|
|
assumeTrue(isTestInfrastructureEnabled());
|
|
|
|
|
|
|
|
String url=scopeConfiguration().getByEngine(Engine.GS_ENGINE).get(0).getBaseEndpoint();
|
|
new TestClient(new ConnectionDescriptor(url)).get("");
|
|
}
|
|
|
|
|
|
// static String sdiHostname="sdi-t.pre.d4science.org";
|
|
// static String scope ="/pred4s/preprod/preVRE";
|
|
//
|
|
// static String basePath="";
|
|
// static String scope = "/gcube/devsec/devVRE";
|
|
//
|
|
//
|
|
// static ConnectionDescriptor DEV_SDI=new ConnectionDescriptor("https://sdi.d4science.org/sdi-service/gcube/service/");
|
|
//
|
|
// static ConnectionDescriptor DEV_GS=new ConnectionDescriptor("https://geoserver1.dev.d4science.org/geoserver/rest");
|
|
//
|
|
// @BeforeClass
|
|
// public static void setScope(){
|
|
// TokenSetter.set(scope);
|
|
// }
|
|
//
|
|
// @Test
|
|
// public void testContext() throws RemoteException, Exception {
|
|
//
|
|
//
|
|
// new TestClient(DEV_SDI).get("SDI");
|
|
//
|
|
// }
|
|
//
|
|
// @Test
|
|
// public void testBasicAuth() throws RemoteException, Exception {
|
|
//
|
|
//
|
|
// TestClient c=new TestClient(DEV_GS);
|
|
// c.setHttpBasicAuth("admin", "GS-d3v-98751");
|
|
// c.get("workspaces");
|
|
//
|
|
// }
|
|
//
|
|
}
|