46 lines
1.3 KiB
Java
46 lines
1.3 KiB
Java
package org.gcube.spatial.data.clients.geoserver;
|
|
|
|
import org.gcube.spatial.data.clients.model.ConnectionDescriptor;
|
|
import org.gcube.spatial.data.clients.model.engine.Engine;
|
|
import org.gcube.spatial.data.sdi.model.credentials.AccessType;
|
|
import org.gcube.spatial.data.sdi.model.credentials.Credentials;
|
|
import org.gcube.spatial.data.sdi.model.faults.RemoteException;
|
|
import org.junit.BeforeClass;
|
|
import org.junit.Test;
|
|
|
|
public class GSTests {
|
|
|
|
|
|
// static String sdiHostname="sdi-t.pre.d4science.org";
|
|
// static String scope ="/pred4s/preprod/preVRE";
|
|
//
|
|
// String sdiHostname="sdi-d-d4s.d4science.org";
|
|
static String scope = "/gcube/devsec/devVRE";
|
|
|
|
static ConnectionDescriptor desc;
|
|
|
|
@BeforeClass
|
|
public static void gatherCredentials() {
|
|
desc=new ConnectionDescriptor("https://geoserver1.dev.d4science.org/geoserver");
|
|
desc.add(new Credentials("admin", "GS-d3v-98751", AccessType.ADMIN));
|
|
}
|
|
|
|
@BeforeClass
|
|
public static void setScope(){
|
|
// TokenSetter.set(scope);
|
|
}
|
|
|
|
@Test
|
|
public void gets() throws RemoteException, Exception {
|
|
// System.out.println(new GSRESTClientImpl(new ConnectionDescriptor("https://geoserver1.dev.d4science.org/geoserver/rest")).getWorkspaces());
|
|
GSRESTClient client=new GSRESTClientImpl(desc);
|
|
System.out.println(client.getStyles());
|
|
|
|
System.out.println(client.getWorkspaces());
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|