One more test running.
parent
70de6956ff
commit
2e7aa387f7
|
@ -63,7 +63,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||||
SerialiserModule serialiserModule = new SerialiserModule();
|
SerialiserModule serialiserModule = new SerialiserModule();
|
||||||
TerrainModule terrainModule = new TerrainModule();
|
TerrainModule terrainModule = new TerrainModule();
|
||||||
|
|
||||||
m_scene = SceneSetupHelpers.SetupScene("scene1");
|
m_scene = SceneSetupHelpers.SetupScene("useraccounts");
|
||||||
SceneSetupHelpers.SetupSceneModules(m_scene, m_archiverModule, serialiserModule, terrainModule);
|
SceneSetupHelpers.SetupSceneModules(m_scene, m_archiverModule, serialiserModule, terrainModule);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,13 +77,16 @@ namespace OpenSim.Services.UserAccountService
|
||||||
if (invServiceDll != string.Empty)
|
if (invServiceDll != string.Empty)
|
||||||
m_InventoryService = LoadPlugin<IInventoryService>(invServiceDll, new Object[] { config });
|
m_InventoryService = LoadPlugin<IInventoryService>(invServiceDll, new Object[] { config });
|
||||||
|
|
||||||
MainConsole.Instance.Commands.AddCommand("UserService", false,
|
if (MainConsole.Instance != null)
|
||||||
"create user",
|
{
|
||||||
"create user [<first> [<last> [<pass> [<email>]]]]",
|
MainConsole.Instance.Commands.AddCommand("UserService", false,
|
||||||
"Create a new user", HandleCreateUser);
|
"create user",
|
||||||
MainConsole.Instance.Commands.AddCommand("UserService", false, "reset user password",
|
"create user [<first> [<last> [<pass> [<email>]]]]",
|
||||||
"reset user password [<first> [<last> [<password>]]]",
|
"Create a new user", HandleCreateUser);
|
||||||
"Reset a user password", HandleResetUserPassword);
|
MainConsole.Instance.Commands.AddCommand("UserService", false, "reset user password",
|
||||||
|
"reset user password [<first> [<last> [<password>]]]",
|
||||||
|
"Reset a user password", HandleResetUserPassword);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,7 @@ using OpenSim.Region.CoreModules.Avatar.Gods;
|
||||||
using OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset;
|
using OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset;
|
||||||
using OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory;
|
using OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory;
|
||||||
using OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid;
|
using OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid;
|
||||||
|
using OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
using OpenSim.Tests.Common.Mock;
|
using OpenSim.Tests.Common.Mock;
|
||||||
|
|
||||||
|
@ -60,6 +61,7 @@ namespace OpenSim.Tests.Common.Setup
|
||||||
private static ISharedRegionModule m_assetService = null;
|
private static ISharedRegionModule m_assetService = null;
|
||||||
private static ISharedRegionModule m_inventoryService = null;
|
private static ISharedRegionModule m_inventoryService = null;
|
||||||
private static ISharedRegionModule m_gridService = null;
|
private static ISharedRegionModule m_gridService = null;
|
||||||
|
private static ISharedRegionModule m_userAccountService = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set up a test scene
|
/// Set up a test scene
|
||||||
|
@ -183,6 +185,8 @@ namespace OpenSim.Tests.Common.Setup
|
||||||
StartInventoryService(testScene, false);
|
StartInventoryService(testScene, false);
|
||||||
if (realServices.Contains("grid"))
|
if (realServices.Contains("grid"))
|
||||||
StartGridService(testScene, true);
|
StartGridService(testScene, true);
|
||||||
|
if (realServices.Contains("useraccounts"))
|
||||||
|
StartUserAccountService(testScene, true);
|
||||||
|
|
||||||
}
|
}
|
||||||
// If not, make sure the shared module gets references to this new scene
|
// 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);
|
//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>
|
/// <summary>
|
||||||
/// Setup modules for a scene using their default settings.
|
/// Setup modules for a scene using their default settings.
|
||||||
|
|
Loading…
Reference in New Issue