One more test running.

slimupdates
Diva Canto 2010-02-21 19:11:48 -08:00
parent 70de6956ff
commit 2e7aa387f7
3 changed files with 37 additions and 8 deletions

View File

@ -63,7 +63,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
SerialiserModule serialiserModule = new SerialiserModule();
TerrainModule terrainModule = new TerrainModule();
m_scene = SceneSetupHelpers.SetupScene("scene1");
m_scene = SceneSetupHelpers.SetupScene("useraccounts");
SceneSetupHelpers.SetupSceneModules(m_scene, m_archiverModule, serialiserModule, terrainModule);
}

View File

@ -77,13 +77,16 @@ namespace OpenSim.Services.UserAccountService
if (invServiceDll != string.Empty)
m_InventoryService = LoadPlugin<IInventoryService>(invServiceDll, new Object[] { config });
MainConsole.Instance.Commands.AddCommand("UserService", false,
"create user",
"create user [<first> [<last> [<pass> [<email>]]]]",
"Create a new user", HandleCreateUser);
MainConsole.Instance.Commands.AddCommand("UserService", false, "reset user password",
"reset user password [<first> [<last> [<password>]]]",
"Reset a user password", HandleResetUserPassword);
if (MainConsole.Instance != null)
{
MainConsole.Instance.Commands.AddCommand("UserService", false,
"create user",
"create user [<first> [<last> [<pass> [<email>]]]]",
"Create a new user", HandleCreateUser);
MainConsole.Instance.Commands.AddCommand("UserService", false, "reset user password",
"reset user password [<first> [<last> [<password>]]]",
"Reset a user password", HandleResetUserPassword);
}
}

View File

@ -45,6 +45,7 @@ using OpenSim.Region.CoreModules.Avatar.Gods;
using OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset;
using OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory;
using OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid;
using OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts;
using OpenSim.Services.Interfaces;
using OpenSim.Tests.Common.Mock;
@ -60,6 +61,7 @@ namespace OpenSim.Tests.Common.Setup
private static ISharedRegionModule m_assetService = null;
private static ISharedRegionModule m_inventoryService = null;
private static ISharedRegionModule m_gridService = null;
private static ISharedRegionModule m_userAccountService = null;
/// <summary>
/// Set up a test scene
@ -183,6 +185,8 @@ namespace OpenSim.Tests.Common.Setup
StartInventoryService(testScene, false);
if (realServices.Contains("grid"))
StartGridService(testScene, true);
if (realServices.Contains("useraccounts"))
StartUserAccountService(testScene, true);
}
// If not, make sure the shared module gets references to this new scene
@ -269,6 +273,28 @@ namespace OpenSim.Tests.Common.Setup
//testScene.AddRegionModule(m_gridService.Name, m_gridService);
}
private static void StartUserAccountService(Scene testScene, bool real)
{
IConfigSource config = new IniConfigSource();
config.AddConfig("Modules");
config.AddConfig("UserAccountService");
config.Configs["Modules"].Set("UserAccountServices", "LocalUserAccountServicesConnector");
config.Configs["UserAccountService"].Set("StorageProvider", "OpenSim.Data.Null.dll");
if (real)
config.Configs["UserAccountService"].Set("LocalServiceModule", "OpenSim.Services.UserAccountService.dll:UserAccountService");
if (m_userAccountService == null)
{
ISharedRegionModule userAccountService = new LocalUserAccountServicesConnector();
userAccountService.Initialise(config);
m_userAccountService = userAccountService;
}
//else
// config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:TestGridService");
m_userAccountService.AddRegion(testScene);
m_userAccountService.RegionLoaded(testScene);
//testScene.AddRegionModule(m_gridService.Name, m_gridService);
}
/// <summary>
/// Setup modules for a scene using their default settings.