aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorDiva Canto2010-02-21 19:11:48 -0800
committerDiva Canto2010-02-21 19:11:48 -0800
commit2e7aa387f7a705079df4b534978c0f134591eea9 (patch)
tree50ab7c06119c34f7a14e4e5fb4b70b49c808a341 /OpenSim
parentSmall bug fixes for making tests work. (diff)
downloadopensim-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 '')
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs2
-rw-r--r--OpenSim/Services/UserAccountService/UserAccountService.cs17
-rw-r--r--OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs26
3 files changed, 37 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
index d986274..18f77fd 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
@@ -63,7 +63,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
63 SerialiserModule serialiserModule = new SerialiserModule(); 63 SerialiserModule serialiserModule = new SerialiserModule();
64 TerrainModule terrainModule = new TerrainModule(); 64 TerrainModule terrainModule = new TerrainModule();
65 65
66 m_scene = SceneSetupHelpers.SetupScene("scene1"); 66 m_scene = SceneSetupHelpers.SetupScene("useraccounts");
67 SceneSetupHelpers.SetupSceneModules(m_scene, m_archiverModule, serialiserModule, terrainModule); 67 SceneSetupHelpers.SetupSceneModules(m_scene, m_archiverModule, serialiserModule, terrainModule);
68 } 68 }
69 69
diff --git a/OpenSim/Services/UserAccountService/UserAccountService.cs b/OpenSim/Services/UserAccountService/UserAccountService.cs
index ffb9cca..e498bd5 100644
--- a/OpenSim/Services/UserAccountService/UserAccountService.cs
+++ b/OpenSim/Services/UserAccountService/UserAccountService.cs
@@ -77,13 +77,16 @@ namespace OpenSim.Services.UserAccountService
77 if (invServiceDll != string.Empty) 77 if (invServiceDll != string.Empty)
78 m_InventoryService = LoadPlugin<IInventoryService>(invServiceDll, new Object[] { config }); 78 m_InventoryService = LoadPlugin<IInventoryService>(invServiceDll, new Object[] { config });
79 79
80 MainConsole.Instance.Commands.AddCommand("UserService", false, 80 if (MainConsole.Instance != null)
81 "create user", 81 {
82 "create user [<first> [<last> [<pass> [<email>]]]]", 82 MainConsole.Instance.Commands.AddCommand("UserService", false,
83 "Create a new user", HandleCreateUser); 83 "create user",
84 MainConsole.Instance.Commands.AddCommand("UserService", false, "reset user password", 84 "create user [<first> [<last> [<pass> [<email>]]]]",
85 "reset user password [<first> [<last> [<password>]]]", 85 "Create a new user", HandleCreateUser);
86 "Reset a user password", HandleResetUserPassword); 86 MainConsole.Instance.Commands.AddCommand("UserService", false, "reset user password",
87 "reset user password [<first> [<last> [<password>]]]",
88 "Reset a user password", HandleResetUserPassword);
89 }
87 90
88 } 91 }
89 92
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;
45using OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset; 45using OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset;
46using OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory; 46using OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory;
47using OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid; 47using OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid;
48using OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts;
48using OpenSim.Services.Interfaces; 49using OpenSim.Services.Interfaces;
49using OpenSim.Tests.Common.Mock; 50using 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.