aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-11-27 19:28:04 +0000
committerJustin Clarke Casey2008-11-27 19:28:04 +0000
commit7c6c776ff783b30dfc26a065e63c267e46edc53b (patch)
tree3bd8b995d16d038e01de2d2167faee38488b0e1c /OpenSim/Region
parent* minor: remove the ability to change the client in ScenePresence to reduce t... (diff)
downloadopensim-SC_OLD-7c6c776ff783b30dfc26a065e63c267e46edc53b.zip
opensim-SC_OLD-7c6c776ff783b30dfc26a065e63c267e46edc53b.tar.gz
opensim-SC_OLD-7c6c776ff783b30dfc26a065e63c267e46edc53b.tar.bz2
opensim-SC_OLD-7c6c776ff783b30dfc26a065e63c267e46edc53b.tar.xz
* 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
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs14
-rw-r--r--OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/Tests/TestCommunicationsManager.cs4
4 files changed, 19 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 71ef524..3e34ffb 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -2789,8 +2789,10 @@ namespace OpenSim.Region.Environment.Scenes
2789 } 2789 }
2790 2790
2791 m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent); 2791 m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent);
2792
2792 // rewrite session_id 2793 // rewrite session_id
2793 CachedUserInfo userinfo = CommsManager.UserProfileCacheService.GetUserDetails(agent.AgentID); 2794 CachedUserInfo userinfo = CommsManager.UserProfileCacheService.GetUserDetails(agent.AgentID);
2795
2794 if (userinfo != null) 2796 if (userinfo != null)
2795 { 2797 {
2796 userinfo.SessionID = agent.SessionID; 2798 userinfo.SessionID = agent.SessionID;
diff --git a/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs b/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs
index a24161e..216dce5 100644
--- a/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs
+++ b/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs
@@ -31,6 +31,8 @@ using NUnit.Framework.SyntaxHelpers;
31using OpenMetaverse; 31using OpenMetaverse;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Framework.Communications; 33using OpenSim.Framework.Communications;
34using OpenSim.Framework.Communications.Cache;
35using OpenSim.Region.Communications.Local;
34using OpenSim.Region.Environment.Scenes; 36using OpenSim.Region.Environment.Scenes;
35 37
36namespace OpenSim.Region.Environment.Scenes.Tests 38namespace OpenSim.Region.Environment.Scenes.Tests
@@ -57,7 +59,7 @@ namespace OpenSim.Region.Environment.Scenes.Tests
57 /// <summary> 59 /// <summary>
58 /// Test adding an object to a scene. 60 /// Test adding an object to a scene.
59 /// </summary> 61 /// </summary>
60 [Test] 62 [Test]
61 public void TestAddSceneObject() 63 public void TestAddSceneObject()
62 { 64 {
63 Scene scene = SceneTestUtils.SetupScene(); 65 Scene scene = SceneTestUtils.SetupScene();
@@ -99,6 +101,11 @@ namespace OpenSim.Region.Environment.Scenes.Tests
99 101
100 SceneObjectPart part = SceneTestUtils.AddSceneObject(scene); 102 SceneObjectPart part = SceneTestUtils.AddSceneObject(scene);
101 103
104 ((LocalUserServices)scene.CommsManager.UserService).AddPlugin(new TestUserDataPlugin());
105// Assert.That(
106// scene.CommsManager.AddUser("Bob", "Hoskins", "test", "test@test.com", 1000, 1000, agentId),
107// Is.EqualTo(agentId));
108
102 IClientAPI client = SceneTestUtils.AddRootAgent(scene, agentId); 109 IClientAPI client = SceneTestUtils.AddRootAgent(scene, agentId);
103 scene.DeRezObject(client, part.LocalId, UUID.Zero, 9, UUID.Zero); 110 scene.DeRezObject(client, part.LocalId, UUID.Zero, 9, UUID.Zero);
104 111
@@ -107,7 +114,10 @@ namespace OpenSim.Region.Environment.Scenes.Tests
107 114
108 sogd.InventoryDeQueueAndDelete(); 115 sogd.InventoryDeQueueAndDelete();
109 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(part.LocalId); 116 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(part.LocalId);
110 Assert.That(retrievedPart2, Is.Null); 117 Assert.That(retrievedPart2, Is.Null);
118
119// CachedUserInfo userInfo = scene.CommsManager.UserProfileCacheService.GetUserDetails(agentId);
120// Assert.That(userInfo, Is.Not.Null);
111 121
112 // TODO: test that the object actually made it successfully into inventory 122 // TODO: test that the object actually made it successfully into inventory
113 } 123 }
diff --git a/OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs b/OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs
index fcc6c41..587d288 100644
--- a/OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs
+++ b/OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs
@@ -85,8 +85,8 @@ namespace OpenSim.Region.Environment.Scenes.Tests
85 85
86 /// <summary> 86 /// <summary>
87 /// Test removing an uncrossed root agent from a scene. 87 /// Test removing an uncrossed root agent from a scene.
88 /// </summary> 88 /// </summary>
89 [Test] 89 [Test]
90 public void TestRemoveRootAgent() 90 public void TestRemoveRootAgent()
91 { 91 {
92 Scene scene = SceneTestUtils.SetupScene(); 92 Scene scene = SceneTestUtils.SetupScene();
diff --git a/OpenSim/Region/Environment/Scenes/Tests/TestCommunicationsManager.cs b/OpenSim/Region/Environment/Scenes/Tests/TestCommunicationsManager.cs
index 2225edd..9b2046b 100644
--- a/OpenSim/Region/Environment/Scenes/Tests/TestCommunicationsManager.cs
+++ b/OpenSim/Region/Environment/Scenes/Tests/TestCommunicationsManager.cs
@@ -38,7 +38,9 @@ namespace OpenSim.Region.Environment.Scenes.Tests
38 public TestCommunicationsManager() 38 public TestCommunicationsManager()
39 : base(null, null, null, false, null) 39 : base(null, null, null, false, null)
40 { 40 {
41 m_userService = new LocalUserServices(null, 991, 992, null); 41 LocalUserServices lus = new LocalUserServices(null, 991, 992, null);
42 m_userService = lus;
43 m_userServiceAdmin = lus;
42 } 44 }
43 } 45 }
44} 46}