diff options
author | Diva Canto | 2010-02-21 19:11:48 -0800 |
---|---|---|
committer | Diva Canto | 2010-02-21 19:11:48 -0800 |
commit | 2e7aa387f7a705079df4b534978c0f134591eea9 (patch) | |
tree | 50ab7c06119c34f7a14e4e5fb4b70b49c808a341 /OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | |
parent | Small bug fixes for making tests work. (diff) | |
download | opensim-SC_OLD-2e7aa387f7a705079df4b534978c0f134591eea9.zip opensim-SC_OLD-2e7aa387f7a705079df4b534978c0f134591eea9.tar.gz opensim-SC_OLD-2e7aa387f7a705079df4b534978c0f134591eea9.tar.bz2 opensim-SC_OLD-2e7aa387f7a705079df4b534978c0f134591eea9.tar.xz |
One more test running.
Diffstat (limited to 'OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs')
-rw-r--r-- | OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 26 |
1 files changed, 26 insertions, 0 deletions
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; | |||
45 | using OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset; | 45 | using OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset; |
46 | using OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory; | 46 | using OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory; |
47 | using OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid; | 47 | using OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid; |
48 | using OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts; | ||
48 | using OpenSim.Services.Interfaces; | 49 | using OpenSim.Services.Interfaces; |
49 | using OpenSim.Tests.Common.Mock; | 50 | using OpenSim.Tests.Common.Mock; |
50 | 51 | ||
@@ -60,6 +61,7 @@ namespace OpenSim.Tests.Common.Setup | |||
60 | private static ISharedRegionModule m_assetService = null; | 61 | private static ISharedRegionModule m_assetService = null; |
61 | private static ISharedRegionModule m_inventoryService = null; | 62 | private static ISharedRegionModule m_inventoryService = null; |
62 | private static ISharedRegionModule m_gridService = null; | 63 | private static ISharedRegionModule m_gridService = null; |
64 | private static ISharedRegionModule m_userAccountService = null; | ||
63 | 65 | ||
64 | /// <summary> | 66 | /// <summary> |
65 | /// Set up a test scene | 67 | /// Set up a test scene |
@@ -183,6 +185,8 @@ namespace OpenSim.Tests.Common.Setup | |||
183 | StartInventoryService(testScene, false); | 185 | StartInventoryService(testScene, false); |
184 | if (realServices.Contains("grid")) | 186 | if (realServices.Contains("grid")) |
185 | StartGridService(testScene, true); | 187 | StartGridService(testScene, true); |
188 | if (realServices.Contains("useraccounts")) | ||
189 | StartUserAccountService(testScene, true); | ||
186 | 190 | ||
187 | } | 191 | } |
188 | // If not, make sure the shared module gets references to this new scene | 192 | // If not, make sure the shared module gets references to this new scene |
@@ -269,6 +273,28 @@ namespace OpenSim.Tests.Common.Setup | |||
269 | //testScene.AddRegionModule(m_gridService.Name, m_gridService); | 273 | //testScene.AddRegionModule(m_gridService.Name, m_gridService); |
270 | } | 274 | } |
271 | 275 | ||
276 | private static void StartUserAccountService(Scene testScene, bool real) | ||
277 | { | ||
278 | IConfigSource config = new IniConfigSource(); | ||
279 | config.AddConfig("Modules"); | ||
280 | config.AddConfig("UserAccountService"); | ||
281 | config.Configs["Modules"].Set("UserAccountServices", "LocalUserAccountServicesConnector"); | ||
282 | config.Configs["UserAccountService"].Set("StorageProvider", "OpenSim.Data.Null.dll"); | ||
283 | if (real) | ||
284 | config.Configs["UserAccountService"].Set("LocalServiceModule", "OpenSim.Services.UserAccountService.dll:UserAccountService"); | ||
285 | if (m_userAccountService == null) | ||
286 | { | ||
287 | ISharedRegionModule userAccountService = new LocalUserAccountServicesConnector(); | ||
288 | userAccountService.Initialise(config); | ||
289 | m_userAccountService = userAccountService; | ||
290 | } | ||
291 | //else | ||
292 | // config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:TestGridService"); | ||
293 | m_userAccountService.AddRegion(testScene); | ||
294 | m_userAccountService.RegionLoaded(testScene); | ||
295 | //testScene.AddRegionModule(m_gridService.Name, m_gridService); | ||
296 | } | ||
297 | |||
272 | 298 | ||
273 | /// <summary> | 299 | /// <summary> |
274 | /// Setup modules for a scene using their default settings. | 300 | /// Setup modules for a scene using their default settings. |