/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: DataStoreTest.java,v 1.2 2008/06/25 05:44:16 qcheng Exp $
*
*/
/**
* This is to test the data store sub commands.
*/
/**
* Creates a new instance of <code>DataStoreTest</code>
*/
public DataStoreTest() {
super("CLI");
}
/**
* Create the CLIManager.
*/
public void suiteSetup()
throws CLIException {
"com.sun.identity.cli.AccessManager");
}
@Parameters ({"realm"})
throws CLIException {
"list-datastores",
realm};
exiting("listDataStores");
}
@Parameters ({"realm"})
throws CLIException {
"create-datastore",
"sunIdRepoClass=com.sun.identity.idm.plugins.files.FilesRepo",
"sunFilesIdRepoDirectory=/tmp/clitestdatastore"
};
exiting("createDataStore");
}
/*
* The following test will fail under flat file configuration datastore
* because there is not notification in place. Service Configurations is not
* made avaiable after they are created.
* Works OK with Sun DS as configuration datastore.
@Parameters ({"realm"})
@Test(groups = {"cli-datastore", "ops", "update-datastore"},
dependsOnMethods = {"createDataStore"}
)
public void updateDataStore(String realm)
throws CLIException {
String[] param = {realm};
entering("updateDataStore", param);
String[] args = {
"update-datastore",
CLIConstants.PREFIX_ARGUMENT_LONG + IArgument.REALM_NAME,
realm,
CLIConstants.PREFIX_ARGUMENT_LONG + DatastoreOptions.DATASTORE_NAME,
TEST_DATASTORE_NAME,
CLIConstants.PREFIX_ARGUMENT_LONG + IArgument.ATTRIBUTE_VALUES,
"sunFilesIdRepoDirectory=/tmp/clitestdatastoreChanged"
};
CLIRequest req = new CLIRequest(null, args, getAdminSSOToken());
cmdManager.addToRequestQueue(req);
cmdManager.serviceRequestQueue();
exiting("updateDataStore");
} */
@Parameters ({"realm"})
throws CLIException {
"delete-datastores",
};
exiting("deleteDataStores");
}
}