mirror of https://github.com/apache/jclouds.git
Mark a live test as not enabled (needs investigation), change comment line
This commit is contained in:
parent
c674bdb1b3
commit
0dc804f4a7
|
@ -142,7 +142,7 @@ public class VirtualGuestToNodeMetadata implements Function<VirtualGuest, NodeMe
|
||||||
Iterable<ProductItem> items = Iterables.transform(order.getPrices(),ProductItems.item());
|
Iterable<ProductItem> items = Iterables.transform(order.getPrices(),ProductItems.item());
|
||||||
return new ProductItemsToHardware().apply(Sets.newLinkedHashSet(items));
|
return new ProductItemsToHardware().apply(Sets.newLinkedHashSet(items));
|
||||||
} catch (HttpResponseException e) {
|
} catch (HttpResponseException e) {
|
||||||
//For singapore
|
//Shouldn't happen any more - was blowing up in Singapore
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@ public class VirtualGuestToNodeMetadata implements Function<VirtualGuest, NodeMe
|
||||||
ProductItem os = Iterables.find(items, ProductItemPredicates.categoryCode("os"));
|
ProductItem os = Iterables.find(items, ProductItemPredicates.categoryCode("os"));
|
||||||
return new ProductItemToImage().apply(os);
|
return new ProductItemToImage().apply(os);
|
||||||
} catch (HttpResponseException e) {
|
} catch (HttpResponseException e) {
|
||||||
//For singapore
|
//Shouldn't happen any more - was blowing up in Singapore
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,9 +66,11 @@ public class VirtualGuestClientLiveTest extends BaseSoftLayerClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test(enabled = false)
|
||||||
public void testCancelAndPlaceOrder() {
|
public void testCancelAndPlaceOrder() {
|
||||||
|
|
||||||
|
// This method was not working needs testing out.
|
||||||
|
|
||||||
// TODO: Should also check if there are active transactions before trying to cancel.
|
// TODO: Should also check if there are active transactions before trying to cancel.
|
||||||
// objectMask: virtualGuests.activeTransaction
|
// objectMask: virtualGuests.activeTransaction
|
||||||
for( VirtualGuest guest: client.listVirtualGuests()) {
|
for( VirtualGuest guest: client.listVirtualGuests()) {
|
||||||
|
@ -108,10 +110,8 @@ public class VirtualGuestClientLiveTest extends BaseSoftLayerClientLiveTest {
|
||||||
.hostname(TEST_HOSTNAME_PREFIX+new Random().nextInt())
|
.hostname(TEST_HOSTNAME_PREFIX+new Random().nextInt())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
String location = ""+Iterables.get(productPackage.getDatacenters(),0).getId();
|
|
||||||
ProductOrder order = ProductOrder.builder()
|
ProductOrder order = ProductOrder.builder()
|
||||||
.packageId(pkgId)
|
.packageId(pkgId)
|
||||||
.location(location)
|
|
||||||
.quantity(1)
|
.quantity(1)
|
||||||
.useHourlyPricing(true)
|
.useHourlyPricing(true)
|
||||||
.prices(prices)
|
.prices(prices)
|
||||||
|
@ -119,10 +119,15 @@ public class VirtualGuestClientLiveTest extends BaseSoftLayerClientLiveTest {
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
ProductOrderReceipt receipt = context.getApi().getVirtualGuestClient().orderVirtualGuest(order);
|
ProductOrderReceipt receipt = context.getApi().getVirtualGuestClient().orderVirtualGuest(order);
|
||||||
|
ProductOrder order2 = receipt.getOrderDetails();
|
||||||
|
VirtualGuest result = Iterables.get(order2.getVirtualGuests(), 0);
|
||||||
|
|
||||||
|
ProductOrder order3 = context.getApi().getVirtualGuestClient().getOrderTemplate(result.getId());
|
||||||
|
|
||||||
|
assertEquals(order.getPrices(),order3.getPrices());
|
||||||
assertNotNull(receipt);
|
assertNotNull(receipt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void checkVirtualGuest(VirtualGuest vg) {
|
private void checkVirtualGuest(VirtualGuest vg) {
|
||||||
if (vg.getBillingItemId()==-1) return;//Quotes and shutting down guests
|
if (vg.getBillingItemId()==-1) return;//Quotes and shutting down guests
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue