From 2e7aa387f7a705079df4b534978c0f134591eea9 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 21 Feb 2010 19:11:48 -0800 Subject: One more test running. --- OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'OpenSim/Tests') diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs index e37e137..9e718f6 100644 --- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs +++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs @@ -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; /// /// 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); + } + /// /// Setup modules for a scene using their default settings. -- cgit v1.1