Search in sources :

Example 51 with CLIRequest

use of com.sun.identity.cli.CLIRequest in project OpenAM by OpenRock.

the class AuthConfigTest method listAuthInstances.

@Parameters({ "realm" })
@Test(groups = { "cli-authconfig", "ops", "list-auth-instances" })
public void listAuthInstances(String realm) throws CLIException {
    String[] param = { realm };
    entering("listAuthInstances", param);
    String[] args = { "list-auth-instances", CLIConstants.PREFIX_ARGUMENT_LONG + IArgument.REALM_NAME, realm };
    CLIRequest req = new CLIRequest(null, args, getAdminSSOToken());
    cmdManager.addToRequestQueue(req);
    cmdManager.serviceRequestQueue();
    exiting("listAuthInstances");
}
Also used : CLIRequest(com.sun.identity.cli.CLIRequest) Parameters(org.testng.annotations.Parameters) Test(org.testng.annotations.Test) AfterTest(org.testng.annotations.AfterTest) BeforeTest(org.testng.annotations.BeforeTest)

Example 52 with CLIRequest

use of com.sun.identity.cli.CLIRequest in project OpenAM by OpenRock.

the class DataStoreTest method createDataStore.

@Parameters({ "realm" })
@Test(groups = { "cli-datastore", "ops", "create-datastore" })
public void createDataStore(String realm) throws CLIException {
    String[] param = { realm };
    entering("createDataStore", param);
    String[] args = { "create-datastore", CLIConstants.PREFIX_ARGUMENT_LONG + IArgument.REALM_NAME, realm, CLIConstants.PREFIX_ARGUMENT_LONG + DatastoreOptions.DATASTORE_NAME, TEST_DATASTORE_NAME, CLIConstants.PREFIX_ARGUMENT_LONG + DatastoreOptions.DATASTORE_TYPE, TEST_DATASTORE_TYPE, CLIConstants.PREFIX_ARGUMENT_LONG + IArgument.ATTRIBUTE_VALUES, "sunIdRepoClass=com.sun.identity.idm.plugins.files.FilesRepo", "sunFilesIdRepoDirectory=/tmp/clitestdatastore" };
    CLIRequest req = new CLIRequest(null, args, getAdminSSOToken());
    cmdManager.addToRequestQueue(req);
    cmdManager.serviceRequestQueue();
    exiting("createDataStore");
}
Also used : CLIRequest(com.sun.identity.cli.CLIRequest) Parameters(org.testng.annotations.Parameters) Test(org.testng.annotations.Test) BeforeTest(org.testng.annotations.BeforeTest)

Example 53 with CLIRequest

use of com.sun.identity.cli.CLIRequest in project OpenAM by OpenRock.

the class DataStoreTest method listDataStores.

@Parameters({ "realm" })
@Test(groups = { "cli-datastore", "ops", "list-datastores" })
public void listDataStores(String realm) throws CLIException {
    String[] param = { realm };
    entering("listDataStores", param);
    String[] args = { "list-datastores", CLIConstants.PREFIX_ARGUMENT_LONG + IArgument.REALM_NAME, realm };
    CLIRequest req = new CLIRequest(null, args, getAdminSSOToken());
    cmdManager.addToRequestQueue(req);
    cmdManager.serviceRequestQueue();
    exiting("listDataStores");
}
Also used : CLIRequest(com.sun.identity.cli.CLIRequest) Parameters(org.testng.annotations.Parameters) Test(org.testng.annotations.Test) BeforeTest(org.testng.annotations.BeforeTest)

Example 54 with CLIRequest

use of com.sun.identity.cli.CLIRequest in project OpenAM by OpenRock.

the class AuthConfigTest method listAuthConfigurations.

@Parameters({ "realm" })
@Test(groups = { "cli-authconfig", "ops", "list-auth-cfgs" })
public void listAuthConfigurations(String realm) throws CLIException, AMConfigurationException {
    String[] param = { realm };
    entering("listAuthConfigurations", param);
    String[] args = { "list-auth-cfgs", CLIConstants.PREFIX_ARGUMENT_LONG + IArgument.REALM_NAME, realm };
    CLIRequest req = new CLIRequest(null, args, getAdminSSOToken());
    cmdManager.addToRequestQueue(req);
    cmdManager.serviceRequestQueue();
    exiting("listAuthConfigurations");
}
Also used : CLIRequest(com.sun.identity.cli.CLIRequest) Parameters(org.testng.annotations.Parameters) Test(org.testng.annotations.Test) AfterTest(org.testng.annotations.AfterTest) BeforeTest(org.testng.annotations.BeforeTest)

Example 55 with CLIRequest

use of com.sun.identity.cli.CLIRequest in project OpenAM by OpenRock.

the class AuthConfigTest method createAuthInstance.

@Parameters({ "realm" })
@Test(groups = { "cli-authconfig", "ops", "create-auth-instance" })
public void createAuthInstance(String realm) throws CLIException, AMConfigurationException {
    String[] param = { realm };
    entering("createAuthInstance", param);
    String[] args = { "create-auth-instance", CLIConstants.PREFIX_ARGUMENT_LONG + IArgument.REALM_NAME, realm, CLIConstants.PREFIX_ARGUMENT_LONG + AuthOptions.AUTH_INSTANCE_NAME, TEST_AUTH_INSTANCE, CLIConstants.PREFIX_ARGUMENT_LONG + AuthOptions.AUTH_INSTANCE_TYPE, TEST_AUTH_TYPE };
    CLIRequest req = new CLIRequest(null, args, getAdminSSOToken());
    cmdManager.addToRequestQueue(req);
    cmdManager.serviceRequestQueue();
    exiting("createAuthInstance");
}
Also used : CLIRequest(com.sun.identity.cli.CLIRequest) Parameters(org.testng.annotations.Parameters) Test(org.testng.annotations.Test) AfterTest(org.testng.annotations.AfterTest) BeforeTest(org.testng.annotations.BeforeTest)

Aggregations

CLIRequest (com.sun.identity.cli.CLIRequest)102 Test (org.testng.annotations.Test)95 BeforeTest (org.testng.annotations.BeforeTest)77 AfterTest (org.testng.annotations.AfterTest)66 Parameters (org.testng.annotations.Parameters)57 SSOException (com.iplanet.sso.SSOException)28 CLIException (com.sun.identity.cli.CLIException)27 SMSException (com.sun.identity.sm.SMSException)25 ServiceSchemaManager (com.sun.identity.sm.ServiceSchemaManager)25 ServiceSchema (com.sun.identity.sm.ServiceSchema)21 AttributeSchema (com.sun.identity.sm.AttributeSchema)18 Set (java.util.Set)18 AMIdentity (com.sun.identity.idm.AMIdentity)14 HashSet (java.util.HashSet)14 SSOToken (com.iplanet.sso.SSOToken)13 ApplicationPrivilegeManager (com.sun.identity.entitlement.ApplicationPrivilegeManager)10 ApplicationPrivilege (com.sun.identity.entitlement.ApplicationPrivilege)9 HashMap (java.util.HashMap)8 Map (java.util.Map)8 OrganizationConfigManager (com.sun.identity.sm.OrganizationConfigManager)5