Fix regression TestDeleteSceneObjectAsyncToUserInventory by adding a BasicInventoryAccessModule() and re-enable in test suite.

connector_plugin
Justin Clark-Casey (justincc) 2012-11-24 03:38:15 +00:00
parent 22d4c52ffc
commit a4ce63d0cd
1 changed files with 12 additions and 7 deletions

View File

@ -29,10 +29,12 @@ using System;
using System.Collections.Generic;
using System.Reflection;
using System.Threading;
using Nini.Config;
using NUnit.Framework;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Communications;
using OpenSim.Region.CoreModules.Framework.InventoryAccess;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Services.Interfaces;
using OpenSim.Tests.Common;
@ -239,28 +241,31 @@ namespace OpenSim.Region.Framework.Scenes.Tests
/// <summary>
/// Test deleting an object asynchronously to user inventory.
/// </summary>
// [Test]
[Test]
public void TestDeleteSceneObjectAsyncToUserInventory()
{
TestHelpers.InMethod();
TestHelpers.EnableLogging();
// TestHelpers.EnableLogging();
UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001");
string myObjectName = "Fred";
TestScene scene = new SceneHelpers().SetupScene();
IConfigSource configSource = new IniConfigSource();
IConfig config = configSource.AddConfig("Modules");
config.Set("InventoryAccessModule", "BasicInventoryAccessModule");
SceneHelpers.SetupSceneModules(
scene, configSource, new object[] { new BasicInventoryAccessModule() });
SceneHelpers.SetupSceneModules(scene, new object[] { });
// Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
sogd.Enabled = false;
SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, myObjectName, agentId);
// Assert.That(
// scene.CommsManager.UserAdminService.AddUser(
// "Bob", "Hoskins", "test", "test@test.com", 1000, 1000, agentId),
// Is.EqualTo(agentId));
UserAccount ua = UserAccountHelpers.CreateUserWithInventory(scene, agentId);
InventoryFolderBase folder1
= UserInventoryHelpers.CreateInventoryFolder(scene.InventoryService, ua.PrincipalID, "folder1");