mirror of https://github.com/apache/jclouds.git
Fixup session and login live testing
This commit is contained in:
parent
27fb042c11
commit
d7bf98017b
|
@ -32,7 +32,6 @@ import org.jclouds.http.HttpResponse;
|
|||
import org.jclouds.util.Strings2;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.SessionWithToken;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.org.OrgList;
|
||||
import org.jclouds.vcloud.director.v1_5.features.admin.AdminCatalogClient;
|
||||
import org.jclouds.vcloud.director.v1_5.internal.BaseVCloudDirectorClientLiveTest;
|
||||
import org.jclouds.xml.internal.JAXBParser;
|
||||
import org.testng.annotations.Test;
|
||||
|
@ -41,7 +40,7 @@ import com.google.common.collect.ImmutableMultimap;
|
|||
import com.google.common.collect.Iterables;
|
||||
|
||||
/**
|
||||
* Tests live behavior of {@link AdminCatalogClient}.
|
||||
* Tests live behavior of operations that use {@link HttpClient}.
|
||||
*
|
||||
* @author danikov
|
||||
*/
|
||||
|
|
|
@ -23,9 +23,7 @@ import static org.testng.Assert.assertNotNull;
|
|||
import static org.testng.Assert.assertTrue;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.jclouds.Constants;
|
||||
import org.jclouds.apis.ApiMetadata;
|
||||
import org.jclouds.apis.BaseContextLiveTest;
|
||||
import org.jclouds.rest.AnonymousRestApiMetadata;
|
||||
|
@ -39,18 +37,20 @@ import org.testng.annotations.Test;
|
|||
import com.google.common.reflect.TypeToken;
|
||||
|
||||
/**
|
||||
* Tests behavior of {@code SessionClient}. Note this class is tested completely independently of
|
||||
* VCloudClient as it is a dependency of the VCloud context working.
|
||||
* Tests behavior of {@link SessionClient}. Note this class is tested completely independently of
|
||||
* {@link VCloudDirectorClient} as it is a dependency of the {@code vcloud-director} context working.
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Listeners(FormatApiResultsListener.class)
|
||||
@Test(groups = { "live", "user", "login" }, testName = "SessionClientLiveTest")
|
||||
@Test(groups = { "live", "user" }, testName = "SessionClientLiveTest")
|
||||
public class SessionClientLiveTest extends BaseContextLiveTest<RestContext<SessionClient, SessionAsyncClient>> {
|
||||
|
||||
public SessionClientLiveTest() {
|
||||
provider = "vcloud-director";
|
||||
}
|
||||
|
||||
@Override
|
||||
@BeforeGroups(groups = { "live" })
|
||||
public void setupContext() {
|
||||
super.setupContext();
|
||||
|
@ -61,25 +61,6 @@ public class SessionClientLiveTest extends BaseContextLiveTest<RestContext<Sessi
|
|||
private SessionClient client;
|
||||
private SessionWithToken sessionWithToken;
|
||||
|
||||
//temporary until we marry up the test fixtures
|
||||
|
||||
protected String identity;
|
||||
protected String credential;
|
||||
protected String endpoint;
|
||||
|
||||
@Override
|
||||
protected Properties setupProperties() {
|
||||
Properties overrides = new Properties();
|
||||
overrides.setProperty(Constants.PROPERTY_TRUST_ALL_CERTS, "true");
|
||||
overrides.setProperty(Constants.PROPERTY_RELAX_HOSTNAME, "true");
|
||||
identity = setIfTestSystemPropertyPresent(overrides, provider + ".identity");
|
||||
credential = setIfTestSystemPropertyPresent(overrides, provider + ".credential");
|
||||
endpoint = setIfTestSystemPropertyPresent(overrides, provider + ".endpoint");
|
||||
setIfTestSystemPropertyPresent(overrides, provider + ".api-version");
|
||||
setIfTestSystemPropertyPresent(overrides, provider + ".build-version");
|
||||
return overrides;
|
||||
}
|
||||
|
||||
@Test(testName = "POST /sessions")
|
||||
public void testLogin() {
|
||||
String user = identity.substring(0, identity.lastIndexOf('@'));
|
||||
|
|
Loading…
Reference in New Issue