aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Setup
diff options
context:
space:
mode:
authorMelanie2010-06-04 21:11:15 +0100
committerMelanie2010-06-04 21:11:15 +0100
commitc5878b6610d4a729752fddf15ad6c99c302375a3 (patch)
tree12c570c68ed6f49965ce42fa0147b79ca21d9f96 /OpenSim/Tests/Common/Setup
parentChange the admin kick message to something more generic, "OpenSim Manager" is... (diff)
parentbring TestLoadIarV0_1AbsentUsers() back online (diff)
downloadopensim-SC-c5878b6610d4a729752fddf15ad6c99c302375a3.zip
opensim-SC-c5878b6610d4a729752fddf15ad6c99c302375a3.tar.gz
opensim-SC-c5878b6610d4a729752fddf15ad6c99c302375a3.tar.bz2
opensim-SC-c5878b6610d4a729752fddf15ad6c99c302375a3.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Tests/Common/Setup')
-rw-r--r--OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs21
-rw-r--r--OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs5
2 files changed, 11 insertions, 15 deletions
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index 2756324..4a356e2 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -191,7 +191,7 @@ namespace OpenSim.Tests.Common.Setup
191 if (realServices.Contains("grid")) 191 if (realServices.Contains("grid"))
192 StartGridService(testScene, true); 192 StartGridService(testScene, true);
193 193
194 StartUserAccountService(testScene, realServices.Contains("useraccounts")); 194 StartUserAccountService(testScene);
195 } 195 }
196 // If not, make sure the shared module gets references to this new scene 196 // If not, make sure the shared module gets references to this new scene
197 else 197 else
@@ -260,7 +260,7 @@ namespace OpenSim.Tests.Common.Setup
260 "LocalServiceModule", "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"); 260 "LocalServiceModule", "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService");
261 else 261 else
262 config.Configs["AuthenticationService"].Set( 262 config.Configs["AuthenticationService"].Set(
263 "LocalServiceModule", "OpenSim.Tests.Common.dll:MockuthenticationService"); 263 "LocalServiceModule", "OpenSim.Tests.Common.dll:MockAuthenticationService");
264 config.Configs["AuthenticationService"].Set("StorageProvider", "OpenSim.Data.Null.dll"); 264 config.Configs["AuthenticationService"].Set("StorageProvider", "OpenSim.Data.Null.dll");
265 service.Initialise(config); 265 service.Initialise(config);
266 service.AddRegion(testScene); 266 service.AddRegion(testScene);
@@ -311,24 +311,18 @@ namespace OpenSim.Tests.Common.Setup
311 } 311 }
312 312
313 /// <summary> 313 /// <summary>
314 /// Start a user account service, whether real or mock 314 /// Start a user account service
315 /// </summary> 315 /// </summary>
316 /// <param name="testScene"></param> 316 /// <param name="testScene"></param>
317 /// <param name="real">Starts a real service if true, a mock service if not</param> 317 private static void StartUserAccountService(Scene testScene)
318 private static void StartUserAccountService(Scene testScene, bool real)
319 { 318 {
320 IConfigSource config = new IniConfigSource(); 319 IConfigSource config = new IniConfigSource();
321 config.AddConfig("Modules"); 320 config.AddConfig("Modules");
322 config.AddConfig("UserAccountService"); 321 config.AddConfig("UserAccountService");
323 config.Configs["Modules"].Set("UserAccountServices", "LocalUserAccountServicesConnector"); 322 config.Configs["Modules"].Set("UserAccountServices", "LocalUserAccountServicesConnector");
324 config.Configs["UserAccountService"].Set("StorageProvider", "OpenSim.Data.Null.dll"); 323 config.Configs["UserAccountService"].Set("StorageProvider", "OpenSim.Data.Null.dll");
325 324 config.Configs["UserAccountService"].Set(
326 if (real) 325 "LocalServiceModule", "OpenSim.Services.UserAccountService.dll:UserAccountService");
327 config.Configs["UserAccountService"].Set(
328 "LocalServiceModule", "OpenSim.Services.UserAccountService.dll:UserAccountService");
329 else
330 config.Configs["UserAccountService"].Set(
331 "LocalServiceModule", "OpenSim.Tests.Common.dll:MockUserAccountService");
332 326
333 if (m_userAccountService == null) 327 if (m_userAccountService == null)
334 { 328 {
@@ -336,8 +330,7 @@ namespace OpenSim.Tests.Common.Setup
336 userAccountService.Initialise(config); 330 userAccountService.Initialise(config);
337 m_userAccountService = userAccountService; 331 m_userAccountService = userAccountService;
338 } 332 }
339 //else 333
340 // config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:TestGridService");
341 m_userAccountService.AddRegion(testScene); 334 m_userAccountService.AddRegion(testScene);
342 m_userAccountService.RegionLoaded(testScene); 335 m_userAccountService.RegionLoaded(testScene);
343 testScene.AddRegionModule(m_userAccountService.Name, m_userAccountService); 336 testScene.AddRegionModule(m_userAccountService.Name, m_userAccountService);
diff --git a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs
index e6a7818..380f258 100644
--- a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs
+++ b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs
@@ -25,6 +25,7 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System.Collections.Generic;
28using OpenMetaverse; 29using OpenMetaverse;
29using OpenSim.Framework.Communications; 30using OpenSim.Framework.Communications;
30using OpenSim.Region.Framework.Scenes; 31using OpenSim.Region.Framework.Scenes;
@@ -124,7 +125,9 @@ namespace OpenSim.Tests.Common.Setup
124 public static UserAccount CreateUserWithInventory( 125 public static UserAccount CreateUserWithInventory(
125 Scene scene, string firstName, string lastName, UUID userId, string pw) 126 Scene scene, string firstName, string lastName, UUID userId, string pw)
126 { 127 {
127 UserAccount ua = new UserAccount(userId) { FirstName = firstName, LastName = lastName }; 128 UserAccount ua
129 = new UserAccount(userId)
130 { FirstName = firstName, LastName = lastName, ServiceURLs = new Dictionary<string, object>() };
128 scene.UserAccountService.StoreUserAccount(ua); 131 scene.UserAccountService.StoreUserAccount(ua);
129 scene.InventoryService.CreateUserInventory(ua.PrincipalID); 132 scene.InventoryService.CreateUserInventory(ua.PrincipalID);
130 scene.AuthenticationService.SetPassword(ua.PrincipalID, pw); 133 scene.AuthenticationService.SetPassword(ua.PrincipalID, pw);