mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 02:36:00 +08:00
* test: Add the ability to add a plugin directory to the user and inventory services in order to extend unit tests for user and inventory information
* I can't spend any longer in trying to get Mono.Addins to work with the unit tests, so this is not a proper plugin at this time
This commit is contained in:
@@ -2789,8 +2789,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
|
||||
m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent);
|
||||
|
||||
// rewrite session_id
|
||||
CachedUserInfo userinfo = CommsManager.UserProfileCacheService.GetUserDetails(agent.AgentID);
|
||||
|
||||
if (userinfo != null)
|
||||
{
|
||||
userinfo.SessionID = agent.SessionID;
|
||||
|
||||
@@ -31,6 +31,8 @@ using NUnit.Framework.SyntaxHelpers;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Communications;
|
||||
using OpenSim.Framework.Communications.Cache;
|
||||
using OpenSim.Region.Communications.Local;
|
||||
using OpenSim.Region.Environment.Scenes;
|
||||
|
||||
namespace OpenSim.Region.Environment.Scenes.Tests
|
||||
@@ -57,7 +59,7 @@ namespace OpenSim.Region.Environment.Scenes.Tests
|
||||
/// <summary>
|
||||
/// Test adding an object to a scene.
|
||||
/// </summary>
|
||||
[Test]
|
||||
[Test]
|
||||
public void TestAddSceneObject()
|
||||
{
|
||||
Scene scene = SceneTestUtils.SetupScene();
|
||||
@@ -99,6 +101,11 @@ namespace OpenSim.Region.Environment.Scenes.Tests
|
||||
|
||||
SceneObjectPart part = SceneTestUtils.AddSceneObject(scene);
|
||||
|
||||
((LocalUserServices)scene.CommsManager.UserService).AddPlugin(new TestUserDataPlugin());
|
||||
// Assert.That(
|
||||
// scene.CommsManager.AddUser("Bob", "Hoskins", "test", "test@test.com", 1000, 1000, agentId),
|
||||
// Is.EqualTo(agentId));
|
||||
|
||||
IClientAPI client = SceneTestUtils.AddRootAgent(scene, agentId);
|
||||
scene.DeRezObject(client, part.LocalId, UUID.Zero, 9, UUID.Zero);
|
||||
|
||||
@@ -107,7 +114,10 @@ namespace OpenSim.Region.Environment.Scenes.Tests
|
||||
|
||||
sogd.InventoryDeQueueAndDelete();
|
||||
SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(part.LocalId);
|
||||
Assert.That(retrievedPart2, Is.Null);
|
||||
Assert.That(retrievedPart2, Is.Null);
|
||||
|
||||
// CachedUserInfo userInfo = scene.CommsManager.UserProfileCacheService.GetUserDetails(agentId);
|
||||
// Assert.That(userInfo, Is.Not.Null);
|
||||
|
||||
// TODO: test that the object actually made it successfully into inventory
|
||||
}
|
||||
|
||||
@@ -85,8 +85,8 @@ namespace OpenSim.Region.Environment.Scenes.Tests
|
||||
|
||||
/// <summary>
|
||||
/// Test removing an uncrossed root agent from a scene.
|
||||
/// </summary>
|
||||
[Test]
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestRemoveRootAgent()
|
||||
{
|
||||
Scene scene = SceneTestUtils.SetupScene();
|
||||
|
||||
@@ -38,7 +38,9 @@ namespace OpenSim.Region.Environment.Scenes.Tests
|
||||
public TestCommunicationsManager()
|
||||
: base(null, null, null, false, null)
|
||||
{
|
||||
m_userService = new LocalUserServices(null, 991, 992, null);
|
||||
LocalUserServices lus = new LocalUserServices(null, 991, 992, null);
|
||||
m_userService = lus;
|
||||
m_userServiceAdmin = lus;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user