Exemple #1
0
  @BeforeClass(groups = "wso2.greg", alwaysRun = true)
  public void initialize()
      throws RemoteException, LoginAuthenticationExceptionException,
          org.wso2.carbon.registry.api.RegistryException {
    int userId = 2;

    RegistryProviderUtil provider = new RegistryProviderUtil();
    WSRegistryServiceClient wsRegistry =
        provider.getWSRegistry(userId, ProductConstant.GREG_SERVER_NAME);
    governanceRegistry = provider.getGovernanceRegistry(wsRegistry, userId);
  }
Exemple #2
0
  @BeforeClass(groups = {"wso2.greg"})
  public void initialize() throws RegistryException, AxisFault {
    int userId = 0;
    RegistryProviderUtil registryProviderUtil = new RegistryProviderUtil();
    registry = registryProviderUtil.getWSRegistry(userId, ProductConstant.GREG_SERVER_NAME);

    resourcePath =
        ProductConstant.SYSTEM_TEST_RESOURCE_LOCATION
            + "artifacts"
            + File.separator
            + "GREG"
            + File.separator;
  }
Exemple #3
0
  @BeforeClass
  public void init() throws Exception {
    EnvironmentBuilder builder = new EnvironmentBuilder().greg(userId);
    ManageEnvironment environment = builder.build();
    RegistryProviderUtil registryProviderUtil = new RegistryProviderUtil();
    registry = registryProviderUtil.getWSRegistry(userId, ProductConstant.GREG_SERVER_NAME);
    userName = userInfo.getUserName();
    searchAdminServiceClient =
        new SearchAdminServiceClient(
            environment.getGreg().getBackEndUrl(), userInfo.getUserName(), userInfo.getPassword());

    resourcePath = "/_system/governance/test";

    populateResource();
  }
  /**
   * @throws RemoteException
   * @throws LoginAuthenticationExceptionException
   * @throws RegistryException
   */
  @BeforeClass(alwaysRun = true)
  public void init()
      throws RemoteException, LoginAuthenticationExceptionException, RegistryException {
    EnvironmentBuilder builder = new EnvironmentBuilder().greg(userId);
    ManageEnvironment environment = builder.build();

    lifeCycleAdminServiceClient =
        new LifeCycleAdminServiceClient(
            environment.getGreg().getProductVariables().getBackendUrl(),
            environment.getGreg().getSessionCookie());
    governanceServiceClient =
        new GovernanceServiceClient(
            environment.getGreg().getProductVariables().getBackendUrl(),
            environment.getGreg().getSessionCookie());
    listMetadataServiceClient =
        new ListMetaDataServiceClient(
            environment.getGreg().getProductVariables().getBackendUrl(),
            environment.getGreg().getSessionCookie());
    lifeCycleManagementClient =
        new LifeCycleManagementClient(
            environment.getGreg().getProductVariables().getBackendUrl(),
            environment.getGreg().getSessionCookie());
    userManagementClient =
        new UserManagementClient(
            environment.getGreg().getProductVariables().getBackendUrl(),
            environment.getGreg().getSessionCookie());
    resourceAdminServiceClient =
        new ResourceAdminServiceClient(
            environment.getGreg().getProductVariables().getBackendUrl(),
            environment.getGreg().getSessionCookie());
    wsRegistryServiceClient =
        registryProviderUtil.getWSRegistry(userId, ProductConstant.GREG_SERVER_NAME);

    Registry reg =
        registryProviderUtil.getGovernanceRegistry(
            new RegistryProviderUtil().getWSRegistry(userId, ProductConstant.GREG_SERVER_NAME),
            userId);
    GovernanceUtils.loadGovernanceArtifacts((UserRegistry) reg);
    serviceManager = new ServiceManager(reg);
  }
  /**
   * @throws RemoteException
   * @throws LoginAuthenticationExceptionException
   * @throws RegistryException
   */
  @Test(
      groups = "wso2.greg",
      description = "Log in as a different user without devrole",
      dependsOnMethods = "testDemoteFromCreation")
  public void testSetNewUser()
      throws RemoteException, LoginAuthenticationExceptionException, RegistryException {

    EnvironmentBuilder builder = new EnvironmentBuilder().greg(user2Id);
    ManageEnvironment environment = builder.build();

    lifeCycleAdminServiceClient =
        new LifeCycleAdminServiceClient(
            environment.getGreg().getProductVariables().getBackendUrl(),
            environment.getGreg().getSessionCookie());

    governanceServiceClient =
        new GovernanceServiceClient(
            environment.getGreg().getProductVariables().getBackendUrl(),
            environment.getGreg().getSessionCookie());
    listMetadataServiceClient =
        new ListMetaDataServiceClient(
            environment.getGreg().getProductVariables().getBackendUrl(),
            environment.getGreg().getSessionCookie());
    lifeCycleManagementClient =
        new LifeCycleManagementClient(
            environment.getGreg().getProductVariables().getBackendUrl(),
            environment.getGreg().getSessionCookie());
    wsRegistryServiceClient =
        registryProviderUtil.getWSRegistry(user2Id, ProductConstant.GREG_SERVER_NAME);
    userManagementClient =
        new UserManagementClient(
            environment.getGreg().getProductVariables().getBackendUrl(),
            environment.getGreg().getSessionCookie());
    resourceAdminServiceClient =
        new ResourceAdminServiceClient(
            environment.getGreg().getProductVariables().getBackendUrl(),
            environment.getGreg().getSessionCookie());
  }
Exemple #6
0
 @BeforeClass(groups = {"wso2.greg"})
 public void initTest() throws RegistryException, AxisFault {
   int userId = 0;
   RegistryProviderUtil registryProviderUtil = new RegistryProviderUtil();
   registry = registryProviderUtil.getWSRegistry(userId, ProductConstant.GREG_SERVER_NAME);
 }