jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arvindn05 <notificati...@github.com>
Subject Re: [jclouds] add os-hypervisors extension (#819)
Date Thu, 23 Jul 2015 08:51:33 GMT
> +import org.jclouds.http.HttpRequest;
> +import org.jclouds.http.HttpResponse;
> +import org.jclouds.openstack.nova.v2_0.NovaApi;
> +import org.jclouds.openstack.nova.v2_0.domain.regionscoped.Hypervisor;
> +import org.jclouds.openstack.nova.v2_0.domain.regionscoped.HypervisorDetails;
> +import org.jclouds.openstack.nova.v2_0.internal.BaseNovaApiExpectTest;
> +import org.testng.annotations.Test;
> +
> +import static org.testng.Assert.assertEquals;
> +import static org.testng.Assert.assertFalse;
> +import static org.testng.Assert.assertTrue;
> +
> +@Test(groups = "unit", testName = "HypervisorApiExpectTest")
> +public class HypervisorApiExpectTest extends BaseNovaApiExpectTest {
> +
> +   public void testWhenNamespaceInExtensionsListHypervisorPresent() throws Exception
{

figured out the issue. It was because of me using keystoneAuthResponse.json. Somehow the mock
tests only work with access.json

Also tried to make use of beforemethod and aftermethod annotations to do some of the setup.
since the tests run in parallel, i could not use them directly. so had to get creative to
reduce code duplication.
if you like this pattern maybe future tests can use it...

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/819/files#r35301354
Mime
View raw message