Issue 830: Fixes for AdminCatalog live tests

This commit is contained in:
Andrew Donald Kennedy 2012-03-16 15:08:30 +00:00
parent c0fdbdaa27
commit 24c26676fe
3 changed files with 7 additions and 2 deletions

View File

@ -209,7 +209,7 @@ public class VCloudDirectorMediaType {
NETWORK_CONNECTION_SECTION, OPERATING_SYSTEM_SECTION,
PRODUCT_SECTION_LIST, STARTUP_SECTION, VIRTUAL_HARDWARE_SECTION,
RELOCATE_TEMPLATE, ENVELOPE, VM_PENDING_ANSWER, VM_PENDING_QUESTION,
OVF_RASD_ITEM, OVF_RASD_ITEMS_LIST, ADMIN_CATALOG,
OVF_RASD_ITEM, OVF_RASD_ITEMS_LIST, ADMIN_CATALOG, ADMIN_ORG,
PUBLISH_CATALOG_PARAMS, GROUP, ORG_VAPP_TEMPLATE_LEASE_SETTINGS,
ORG_LEASE_SETTINGS, ORG_PASSWORD_POLICY_SETTINGS, ORG_LDAP_SETTINGS,
ORG_GENERAL_SETTINGS, ORG_EMAIL_SETTINGS, ORG_SETTINGS, ADMIN_NETWORK,

View File

@ -20,6 +20,7 @@
package org.jclouds.vcloud.director.v1_5.domain;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
@ -45,6 +46,7 @@ import javax.xml.bind.annotation.XmlRootElement;
*
*/
@XmlRootElement(name = "AdminCatalog")
@XmlType(name = "AdminCatalogType")
public class AdminCatalog extends CatalogType {
public static Builder<?> builder() {

View File

@ -28,6 +28,7 @@ import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;
import java.net.URI;
import java.util.Random;
import org.jclouds.vcloud.director.v1_5.VCloudDirectorException;
import org.jclouds.vcloud.director.v1_5.domain.AdminCatalog;
@ -61,6 +62,8 @@ public class AdminCatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest
/*
* Shared state between dependant tests.
*/
private final Random random = new Random();
private Reference orgRef;
private AdminCatalog catalog;
private Owner owner;
@ -75,7 +78,7 @@ public class AdminCatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest
@Test(testName = "POST /admin/org/{id}/catalogs")
public void testCreateCatalog() {
AdminCatalog newCatalog = AdminCatalog.builder()
.name("Test Catalog")
.name("Test Catalog " + random.nextInt())
.description("created by testCreateCatalog()")
.build();
catalog = catalogClient.createCatalog(orgRef.getHref(), newCatalog);