コード例 #1
0
  //    @Test(groups = {"wso2.greg"}, description = "create lifecycle", dependsOnMethods =
  // "testAddservice")
  public void testCreateLc()
      throws GovernanceException, IOException, LifeCycleManagementServiceExceptionException {

    String resourcePath =
        getTestArtifactLocation()
            + "artifacts"
            + File.separator
            + "GREG"
            + File.separator
            + "lifecycle"
            + File.separator
            + "MultiplePromoteDemoteLCViewVersionsTrue.xml";
    String lifeCycleContent = FileManager.readFile(resourcePath);
    lifeCycleManagementClient.addLifeCycle(lifeCycleContent);

    String[] lifeClycles = lifeCycleManagementClient.getLifecycleList();
    boolean lccreated = false;
    for (String lc : lifeClycles) {
      if (lc.equals("DiffEnvironmentLC")) {
        lccreated = true;
      }
    }

    Assert.assertTrue(lccreated);
  }
コード例 #2
0
  @Test(
      groups = "wso2.greg",
      description = "Create new life cycle",
      dependsOnMethods = "testCreateService")
  public void testCreateNewLifeCycle()
      throws LifeCycleManagementServiceExceptionException, IOException, InterruptedException {

    String resourcePath =
        getTestArtifactLocation()
            + "artifacts"
            + File.separator
            + "GREG"
            + File.separator
            + "lifecycle"
            + File.separator
            + "MultiplePromoteDemoteLC.xml";
    String lifeCycleContent = FileManager.readFile(resourcePath);
    lifeCycleManagementClient.addLifeCycle(lifeCycleContent);
    String[] lifeCycles = lifeCycleManagementClient.getLifecycleList();
    boolean lcStatus = false;
    for (String lc : lifeCycles) {
      if (lc.equalsIgnoreCase(LC_NAME)) {
        lcStatus = true;
      }
    }
    assertTrue(lcStatus, "LifeCycle not found");
  }
コード例 #3
0
  /** @throws Exception */
  @AfterClass()
  public void clear() throws Exception {

    String servicePathToDelete = absPath;
    if (wsRegistryServiceClient.resourceExists(servicePathToDelete)) {
      resourceAdminServiceClient.deleteResource(servicePathToDelete);
    }
    //		String schemaPathToDelete =
    // "/_system/governance/trunk/schemas/org/bar/purchasing/purchasing.xsd";
    //		if (wsRegistryServiceClient.resourceExists(schemaPathToDelete)) {
    //			resourceAdminServiceClient.deleteResource(schemaPathToDelete);
    //		}
    //		String wsdlPathToDelete =
    // "/_system/governance/trunk/wsdls/com/foo/IntergalacticService.wsdl";
    //		if (wsRegistryServiceClient.resourceExists(wsdlPathToDelete)) {
    //			resourceAdminServiceClient.deleteResource(wsdlPathToDelete);
    //		}
    lifeCycleManagementClient.deleteLifeCycle(LC_NAME);
    wsRegistryServiceClient = null;
    lifeCycleAdminServiceClient = null;
    lifeCycleManagementClient = null;
    governanceServiceClient = null;
    listMetadataServiceClient = null;
    resourceAdminServiceClient = null;
    userManagementClient = null;
    infoServiceAdminClient = null;
    humanTaskAdminClient = null;
  }
コード例 #4
0
  //    @AfterClass
  public void clean()
      throws ResourceAdminServiceExceptionException, RemoteException,
          LifeCycleManagementServiceExceptionException, RegistryException {
    delete(servicePath);
    delete("/_system/governance/trunk");
    lifeCycleManagementClient.deleteLifeCycle("DiffEnvironmentLC");

    logViewerClient = null;
    lifeCycleManagementClient = null;
    lifeCycleAdminServiceClient = null;
    resourceAdminServiceClient = null;
    wsRegistryServiceClient = null;
  }
コード例 #5
0
  @AfterClass(alwaysRun = true)
  public void clean() throws Exception {
    delete(pathPrefix + uriSchemaPath);

    GovernanceUtils.loadGovernanceArtifacts((UserRegistry) governance);
    GenericArtifactManager artifactManager = new GenericArtifactManager(governance, "uri");
    GenericArtifact[] artifacts = artifactManager.getAllGenericArtifacts();
    boolean uriDeleted = true;
    for (GenericArtifact genericArtifact : artifacts) {
      if (genericArtifact.getPath().equals(pathPrefix + uriSchemaPath)) {
        uriDeleted = false;
      }
    }
    Assert.assertTrue(uriDeleted);
    delete(pathPrefix + uriWsdlPath);
    delete(pathPrefix + uriGenericPath);
    delete(pathPrefix + uriPolicyPath);
    delete("/_system/governance/trunk/services/com/amazon/soap/1.0.0/AmazonSearchService");
    userManagementClient.deleteRole(utfString);
    lifeCycleManagementClient.deleteLifeCycle(LC_NAME);
    delete("/_system/governance/trunk/endpoints/com/amazon/soap/onca/ep-soap2");
    delete("/_system/governance/trunk/endpoints/com");

    utfString = null;
    governance = null;
    resourceAdminServiceClient = null;
    uriGenericPath = null;
    uriPolicyPath = null;
    uriSchemaPath = null;
    uriWsdlPath = null;
    relationAdminServiceClient = null;
    lifeCycleManagementClient = null;
    lifeCycleAdminServiceClient = null;
    wsRegistryServiceClient = null;
    registryProviderUtil = null;
    infoServiceAdminClient = null;
    userManagementClient = null;
  }