aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
diff options
context:
space:
mode:
authorJohn Hurliman2010-09-12 14:21:51 -0700
committerJohn Hurliman2010-09-12 14:21:51 -0700
commitc03b24cbfdc449cf326cf0f560395753339169dc (patch)
treed62a666839d3c638b5c9799c70be971a2d6d6c18 /OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
parent* Added ISimulationDataService and IEstateDataService (diff)
parentFormatting cleanup. (diff)
downloadopensim-SC_OLD-c03b24cbfdc449cf326cf0f560395753339169dc.zip
opensim-SC_OLD-c03b24cbfdc449cf326cf0f560395753339169dc.tar.gz
opensim-SC_OLD-c03b24cbfdc449cf326cf0f560395753339169dc.tar.bz2
opensim-SC_OLD-c03b24cbfdc449cf326cf0f560395753339169dc.tar.xz
Merged
Diffstat (limited to '')
-rw-r--r--OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs37
1 files changed, 18 insertions, 19 deletions
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index ffd0078..ee76db4 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Tests.Common.Setup
58 public class SceneSetupHelpers 58 public class SceneSetupHelpers
59 { 59 {
60 // These static variables in order to allow regions to be linked by shared modules and same 60 // These static variables in order to allow regions to be linked by shared modules and same
61 // CommunicationsManager. 61 // CommunicationsManager.
62 private static ISharedRegionModule m_assetService = null; 62 private static ISharedRegionModule m_assetService = null;
63// private static ISharedRegionModule m_authenticationService = null; 63// private static ISharedRegionModule m_authenticationService = null;
64 private static ISharedRegionModule m_inventoryService = null; 64 private static ISharedRegionModule m_inventoryService = null;
@@ -69,19 +69,19 @@ namespace OpenSim.Tests.Common.Setup
69 /// <summary> 69 /// <summary>
70 /// Set up a test scene 70 /// Set up a test scene
71 /// </summary> 71 /// </summary>
72 /// 72 ///
73 /// Automatically starts service threads, as would the normal runtime. 73 /// Automatically starts service threads, as would the normal runtime.
74 /// 74 ///
75 /// <returns></returns> 75 /// <returns></returns>
76 public static TestScene SetupScene() 76 public static TestScene SetupScene()
77 { 77 {
78 return SetupScene(""); 78 return SetupScene("");
79 } 79 }
80 80
81 /// <summary> 81 /// <summary>
82 /// Set up a test scene 82 /// Set up a test scene
83 /// </summary> 83 /// </summary>
84 /// 84 ///
85 /// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param> 85 /// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param>
86 /// <returns></returns> 86 /// <returns></returns>
87 public static TestScene SetupScene(String realServices) 87 public static TestScene SetupScene(String realServices)
@@ -94,7 +94,7 @@ namespace OpenSim.Tests.Common.Setup
94 ///// <summary> 94 ///// <summary>
95 ///// Set up a test scene 95 ///// Set up a test scene
96 ///// </summary> 96 ///// </summary>
97 ///// 97 /////
98 ///// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param> 98 ///// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param>
99 ///// <param name="cm">This should be the same if simulating two scenes within a standalone</param> 99 ///// <param name="cm">This should be the same if simulating two scenes within a standalone</param>
100 ///// <returns></returns> 100 ///// <returns></returns>
@@ -168,13 +168,13 @@ namespace OpenSim.Tests.Common.Setup
168 capsModule.Initialise(new IniConfigSource()); 168 capsModule.Initialise(new IniConfigSource());
169 testScene.AddRegionModule(capsModule.Name, capsModule); 169 testScene.AddRegionModule(capsModule.Name, capsModule);
170 capsModule.AddRegion(testScene); 170 capsModule.AddRegion(testScene);
171 171
172 IRegionModule godsModule = new GodsModule(); 172 IRegionModule godsModule = new GodsModule();
173 godsModule.Initialise(testScene, new IniConfigSource()); 173 godsModule.Initialise(testScene, new IniConfigSource());
174 testScene.AddModule(godsModule.Name, godsModule); 174 testScene.AddModule(godsModule.Name, godsModule);
175 realServices = realServices.ToLower(); 175 realServices = realServices.ToLower();
176 // IConfigSource config = new IniConfigSource(); 176 // IConfigSource config = new IniConfigSource();
177 177
178 // If we have a brand new scene, need to initialize shared region modules 178 // If we have a brand new scene, need to initialize shared region modules
179 if ((m_assetService == null && m_inventoryService == null) || newScene) 179 if ((m_assetService == null && m_inventoryService == null) || newScene)
180 { 180 {
@@ -185,13 +185,13 @@ namespace OpenSim.Tests.Common.Setup
185 185
186 // For now, always started a 'real' authentication service 186 // For now, always started a 'real' authentication service
187 StartAuthenticationService(testScene, true); 187 StartAuthenticationService(testScene, true);
188 188
189 if (realServices.Contains("inventory")) 189 if (realServices.Contains("inventory"))
190 StartInventoryService(testScene, true); 190 StartInventoryService(testScene, true);
191 else 191 else
192 StartInventoryService(testScene, false); 192 StartInventoryService(testScene, false);
193 193
194 StartGridService(testScene, true); 194 StartGridService(testScene, true);
195 StartUserAccountService(testScene); 195 StartUserAccountService(testScene);
196 StartPresenceService(testScene); 196 StartPresenceService(testScene);
197 } 197 }
@@ -208,7 +208,7 @@ namespace OpenSim.Tests.Common.Setup
208 m_presenceService.RegionLoaded(testScene); 208 m_presenceService.RegionLoaded(testScene);
209 209
210 } 210 }
211 211
212 m_inventoryService.PostInitialise(); 212 m_inventoryService.PostInitialise();
213 m_assetService.PostInitialise(); 213 m_assetService.PostInitialise();
214 m_userAccountService.PostInitialise(); 214 m_userAccountService.PostInitialise();
@@ -251,7 +251,7 @@ namespace OpenSim.Tests.Common.Setup
251 else 251 else
252 config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:MockAssetService"); 252 config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:MockAssetService");
253 config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); 253 config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
254 assetService.Initialise(config); 254 assetService.Initialise(config);
255 assetService.AddRegion(testScene); 255 assetService.AddRegion(testScene);
256 assetService.RegionLoaded(testScene); 256 assetService.RegionLoaded(testScene);
257 testScene.AddRegionModule(assetService.Name, assetService); 257 testScene.AddRegionModule(assetService.Name, assetService);
@@ -278,7 +278,7 @@ namespace OpenSim.Tests.Common.Setup
278 testScene.AddRegionModule(service.Name, service); 278 testScene.AddRegionModule(service.Name, service);
279 //m_authenticationService = service; 279 //m_authenticationService = service;
280 } 280 }
281 281
282 private static void StartInventoryService(Scene testScene, bool real) 282 private static void StartInventoryService(Scene testScene, bool real)
283 { 283 {
284 ISharedRegionModule inventoryService = new LocalInventoryServicesConnector(); 284 ISharedRegionModule inventoryService = new LocalInventoryServicesConnector();
@@ -286,7 +286,7 @@ namespace OpenSim.Tests.Common.Setup
286 config.AddConfig("Modules"); 286 config.AddConfig("Modules");
287 config.AddConfig("InventoryService"); 287 config.AddConfig("InventoryService");
288 config.Configs["Modules"].Set("InventoryServices", "LocalInventoryServicesConnector"); 288 config.Configs["Modules"].Set("InventoryServices", "LocalInventoryServicesConnector");
289 289
290 if (real) 290 if (real)
291 { 291 {
292 config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Services.InventoryService.dll:InventoryService"); 292 config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Services.InventoryService.dll:InventoryService");
@@ -295,7 +295,7 @@ namespace OpenSim.Tests.Common.Setup
295 { 295 {
296 config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:MockInventoryService"); 296 config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:MockInventoryService");
297 } 297 }
298 298
299 config.Configs["InventoryService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); 299 config.Configs["InventoryService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
300 inventoryService.Initialise(config); 300 inventoryService.Initialise(config);
301 inventoryService.AddRegion(testScene); 301 inventoryService.AddRegion(testScene);
@@ -339,14 +339,14 @@ namespace OpenSim.Tests.Common.Setup
339 config.Configs["UserAccountService"].Set("StorageProvider", "OpenSim.Data.Null.dll"); 339 config.Configs["UserAccountService"].Set("StorageProvider", "OpenSim.Data.Null.dll");
340 config.Configs["UserAccountService"].Set( 340 config.Configs["UserAccountService"].Set(
341 "LocalServiceModule", "OpenSim.Services.UserAccountService.dll:UserAccountService"); 341 "LocalServiceModule", "OpenSim.Services.UserAccountService.dll:UserAccountService");
342 342
343 if (m_userAccountService == null) 343 if (m_userAccountService == null)
344 { 344 {
345 ISharedRegionModule userAccountService = new LocalUserAccountServicesConnector(); 345 ISharedRegionModule userAccountService = new LocalUserAccountServicesConnector();
346 userAccountService.Initialise(config); 346 userAccountService.Initialise(config);
347 m_userAccountService = userAccountService; 347 m_userAccountService = userAccountService;
348 } 348 }
349 349
350 m_userAccountService.AddRegion(testScene); 350 m_userAccountService.AddRegion(testScene);
351 m_userAccountService.RegionLoaded(testScene); 351 m_userAccountService.RegionLoaded(testScene);
352 testScene.AddRegionModule(m_userAccountService.Name, m_userAccountService); 352 testScene.AddRegionModule(m_userAccountService.Name, m_userAccountService);
@@ -560,5 +560,4 @@ namespace OpenSim.Tests.Common.Setup
560 sogd.InventoryDeQueueAndDelete(); 560 sogd.InventoryDeQueueAndDelete();
561 } 561 }
562 } 562 }
563
564} 563}