aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-11-24 03:38:15 +0000
committerJustin Clark-Casey (justincc)2012-11-24 03:38:15 +0000
commita4ce63d0cd5dacdd33c6563bbc1af29ef5d36755 (patch)
tree6ad86a691020a30fa4d7a1edc4b58495186156fa /OpenSim/Region
parentConsistenly make NUnit test cases inherit from OpenSimTestCase which automati... (diff)
downloadopensim-SC-a4ce63d0cd5dacdd33c6563bbc1af29ef5d36755.zip
opensim-SC-a4ce63d0cd5dacdd33c6563bbc1af29ef5d36755.tar.gz
opensim-SC-a4ce63d0cd5dacdd33c6563bbc1af29ef5d36755.tar.bz2
opensim-SC-a4ce63d0cd5dacdd33c6563bbc1af29ef5d36755.tar.xz
Fix regression TestDeleteSceneObjectAsyncToUserInventory by adding a BasicInventoryAccessModule() and re-enable in test suite.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs19
1 files changed, 12 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
index 5b334c6..373094b 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
@@ -29,10 +29,12 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using System.Threading; 31using System.Threading;
32using Nini.Config;
32using NUnit.Framework; 33using NUnit.Framework;
33using OpenMetaverse; 34using OpenMetaverse;
34using OpenSim.Framework; 35using OpenSim.Framework;
35using OpenSim.Framework.Communications; 36using OpenSim.Framework.Communications;
37using OpenSim.Region.CoreModules.Framework.InventoryAccess;
36using OpenSim.Region.Framework.Scenes; 38using OpenSim.Region.Framework.Scenes;
37using OpenSim.Services.Interfaces; 39using OpenSim.Services.Interfaces;
38using OpenSim.Tests.Common; 40using OpenSim.Tests.Common;
@@ -239,28 +241,31 @@ namespace OpenSim.Region.Framework.Scenes.Tests
239 /// <summary> 241 /// <summary>
240 /// Test deleting an object asynchronously to user inventory. 242 /// Test deleting an object asynchronously to user inventory.
241 /// </summary> 243 /// </summary>
242// [Test] 244 [Test]
243 public void TestDeleteSceneObjectAsyncToUserInventory() 245 public void TestDeleteSceneObjectAsyncToUserInventory()
244 { 246 {
245 TestHelpers.InMethod(); 247 TestHelpers.InMethod();
246 TestHelpers.EnableLogging(); 248// TestHelpers.EnableLogging();
247 249
248 UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001"); 250 UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001");
249 string myObjectName = "Fred"; 251 string myObjectName = "Fred";
250 252
251 TestScene scene = new SceneHelpers().SetupScene(); 253 TestScene scene = new SceneHelpers().SetupScene();
252 254
255 IConfigSource configSource = new IniConfigSource();
256 IConfig config = configSource.AddConfig("Modules");
257 config.Set("InventoryAccessModule", "BasicInventoryAccessModule");
258 SceneHelpers.SetupSceneModules(
259 scene, configSource, new object[] { new BasicInventoryAccessModule() });
260
261 SceneHelpers.SetupSceneModules(scene, new object[] { });
262
253 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. 263 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
254 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; 264 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
255 sogd.Enabled = false; 265 sogd.Enabled = false;
256 266
257 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, myObjectName, agentId); 267 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, myObjectName, agentId);
258 268
259// Assert.That(
260// scene.CommsManager.UserAdminService.AddUser(
261// "Bob", "Hoskins", "test", "test@test.com", 1000, 1000, agentId),
262// Is.EqualTo(agentId));
263
264 UserAccount ua = UserAccountHelpers.CreateUserWithInventory(scene, agentId); 269 UserAccount ua = UserAccountHelpers.CreateUserWithInventory(scene, agentId);
265 InventoryFolderBase folder1 270 InventoryFolderBase folder1
266 = UserInventoryHelpers.CreateInventoryFolder(scene.InventoryService, ua.PrincipalID, "folder1"); 271 = UserInventoryHelpers.CreateInventoryFolder(scene.InventoryService, ua.PrincipalID, "folder1");