diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Tests')
9 files changed, 34 insertions, 30 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCopyTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCopyTests.cs index 0b196c1..dc3b717 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCopyTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCopyTests.cs | |||
@@ -42,6 +42,7 @@ using OpenSim.Tests.Common; | |||
42 | 42 | ||
43 | namespace OpenSim.Region.Framework.Scenes.Tests | 43 | namespace OpenSim.Region.Framework.Scenes.Tests |
44 | { | 44 | { |
45 | /* | ||
45 | /// <summary> | 46 | /// <summary> |
46 | /// Test copying of scene objects. | 47 | /// Test copying of scene objects. |
47 | /// </summary> | 48 | /// </summary> |
@@ -343,4 +344,5 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
343 | } | 344 | } |
344 | } | 345 | } |
345 | } | 346 | } |
347 | */ | ||
346 | } \ No newline at end of file | 348 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs index 1c396ac..f980209 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs | |||
@@ -81,8 +81,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
81 | UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); | 81 | UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); |
82 | 82 | ||
83 | TestScene scene = new SceneHelpers().SetupScene(); | 83 | TestScene scene = new SceneHelpers().SetupScene(); |
84 | SceneHelpers.SetupSceneModules(scene, new PermissionsModule()); | 84 | IConfigSource configSource = new IniConfigSource(); |
85 | TestClient client = (TestClient)SceneHelpers.AddScenePresence(scene, userId).ControllingClient; | 85 | IConfig config = configSource.AddConfig("Startup"); |
86 | config.Set("serverside_object_permissions", true); | ||
87 | SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() }); | ||
88 | IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; | ||
86 | 89 | ||
87 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. | 90 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. |
88 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; | 91 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; |
@@ -104,9 +107,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
104 | 107 | ||
105 | SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); | 108 | SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); |
106 | Assert.That(retrievedPart2, Is.Null); | 109 | Assert.That(retrievedPart2, Is.Null); |
107 | |||
108 | Assert.That(client.ReceivedKills.Count, Is.EqualTo(1)); | ||
109 | Assert.That(client.ReceivedKills[0], Is.EqualTo(soLocalId)); | ||
110 | } | 110 | } |
111 | 111 | ||
112 | /// <summary> | 112 | /// <summary> |
@@ -133,7 +133,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
133 | SceneHelpers.SetupSceneModules(sceneB, config, etmB); | 133 | SceneHelpers.SetupSceneModules(sceneB, config, etmB); |
134 | 134 | ||
135 | // We need this for derez | 135 | // We need this for derez |
136 | SceneHelpers.SetupSceneModules(sceneA, new PermissionsModule()); | 136 | //SceneHelpers.SetupSceneModules(sceneA, new PermissionsModule()); |
137 | 137 | ||
138 | UserAccount uaA = UserAccountHelpers.CreateUserWithInventory(sceneA, "Andy", "AAA", 0x1, ""); | 138 | UserAccount uaA = UserAccountHelpers.CreateUserWithInventory(sceneA, "Andy", "AAA", 0x1, ""); |
139 | UserAccount uaB = UserAccountHelpers.CreateUserWithInventory(sceneA, "Brian", "BBB", 0x2, ""); | 139 | UserAccount uaB = UserAccountHelpers.CreateUserWithInventory(sceneA, "Brian", "BBB", 0x2, ""); |
@@ -153,12 +153,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
153 | uint soLocalId = so.LocalId; | 153 | uint soLocalId = so.LocalId; |
154 | 154 | ||
155 | sceneA.DeleteSceneObject(so, false); | 155 | sceneA.DeleteSceneObject(so, false); |
156 | |||
157 | Assert.That(clientA.ReceivedKills.Count, Is.EqualTo(1)); | ||
158 | Assert.That(clientA.ReceivedKills[0], Is.EqualTo(soLocalId)); | ||
159 | |||
160 | Assert.That(childClientsB[0].ReceivedKills.Count, Is.EqualTo(1)); | ||
161 | Assert.That(childClientsB[0].ReceivedKills[0], Is.EqualTo(soLocalId)); | ||
162 | } | 156 | } |
163 | 157 | ||
164 | /// <summary> | 158 | /// <summary> |
@@ -177,7 +171,10 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
177 | UUID objectOwnerId = UUID.Parse("20000000-0000-0000-0000-000000000001"); | 171 | UUID objectOwnerId = UUID.Parse("20000000-0000-0000-0000-000000000001"); |
178 | 172 | ||
179 | TestScene scene = new SceneHelpers().SetupScene(); | 173 | TestScene scene = new SceneHelpers().SetupScene(); |
180 | SceneHelpers.SetupSceneModules(scene, new PermissionsModule()); | 174 | IConfigSource configSource = new IniConfigSource(); |
175 | IConfig config = configSource.AddConfig("Startup"); | ||
176 | config.Set("serverside_object_permissions", true); | ||
177 | SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() }); | ||
181 | IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; | 178 | IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; |
182 | 179 | ||
183 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. | 180 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. |
@@ -260,4 +257,4 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
260 | // Assert.That(retrievedPart, Is.Null); | 257 | // Assert.That(retrievedPart, Is.Null); |
261 | } | 258 | } |
262 | } | 259 | } |
263 | } \ No newline at end of file | 260 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectResizeTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectResizeTests.cs index 975c4d9..9a665f6 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectResizeTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectResizeTests.cs | |||
@@ -60,6 +60,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
60 | Assert.That(g1Post.RootPart.Scale.X, Is.EqualTo(2)); | 60 | Assert.That(g1Post.RootPart.Scale.X, Is.EqualTo(2)); |
61 | Assert.That(g1Post.RootPart.Scale.Y, Is.EqualTo(3)); | 61 | Assert.That(g1Post.RootPart.Scale.Y, Is.EqualTo(3)); |
62 | Assert.That(g1Post.RootPart.Scale.Z, Is.EqualTo(4)); | 62 | Assert.That(g1Post.RootPart.Scale.Z, Is.EqualTo(4)); |
63 | |||
64 | Assert.That(g1Post.RootPart.UndoCount, Is.EqualTo(1)); | ||
63 | } | 65 | } |
64 | 66 | ||
65 | /// <summary> | 67 | /// <summary> |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs index aadf7c6..a92e364 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs | |||
@@ -42,7 +42,7 @@ using OpenSim.Tests.Common; | |||
42 | namespace OpenSim.Region.Framework.Scenes.Tests | 42 | namespace OpenSim.Region.Framework.Scenes.Tests |
43 | { | 43 | { |
44 | [TestFixture] | 44 | [TestFixture] |
45 | public class SceneObjectUserGroupTests : OpenSimTestCase | 45 | public class SceneObjectUserGroupTests |
46 | { | 46 | { |
47 | /// <summary> | 47 | /// <summary> |
48 | /// Test share with group object functionality | 48 | /// Test share with group object functionality |
@@ -52,6 +52,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
52 | public void TestShareWithGroup() | 52 | public void TestShareWithGroup() |
53 | { | 53 | { |
54 | TestHelpers.InMethod(); | 54 | TestHelpers.InMethod(); |
55 | // log4net.Config.XmlConfigurator.Configure(); | ||
55 | 56 | ||
56 | UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); | 57 | UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); |
57 | 58 | ||
@@ -68,7 +69,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
68 | 69 | ||
69 | SceneHelpers.SetupSceneModules( | 70 | SceneHelpers.SetupSceneModules( |
70 | scene, configSource, new object[] | 71 | scene, configSource, new object[] |
71 | { new PermissionsModule(), | 72 | { new DefaultPermissionsModule(), |
72 | new GroupsModule(), | 73 | new GroupsModule(), |
73 | new MockGroupsServicesConnector() }); | 74 | new MockGroupsServicesConnector() }); |
74 | 75 | ||
@@ -79,4 +80,4 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
79 | groupsModule.CreateGroup(client, "group1", "To boldly go", true, UUID.Zero, 5, true, true, true); | 80 | groupsModule.CreateGroup(client, "group1", "To boldly go", true, UUID.Zero, 5, true, true, true); |
80 | } | 81 | } |
81 | } | 82 | } |
82 | } \ No newline at end of file | 83 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCapabilityTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCapabilityTests.cs index 2e6dc70..aa26767 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCapabilityTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCapabilityTests.cs | |||
@@ -73,14 +73,16 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
73 | SceneHelpers.SetupSceneModules(scene, capsMod); | 73 | SceneHelpers.SetupSceneModules(scene, capsMod); |
74 | 74 | ||
75 | ScenePresence sp = SceneHelpers.AddChildScenePresence(scene, spUuid); | 75 | ScenePresence sp = SceneHelpers.AddChildScenePresence(scene, spUuid); |
76 | Assert.That(capsMod.GetCapsForUser(spUuid), Is.Not.Null); | 76 | //Assert.That(capsMod.GetCapsForUser(spUuid), Is.Not.Null); |
77 | 77 | ||
78 | // TODO: Need to add tests for other ICapabiltiesModule methods. | 78 | // TODO: Need to add tests for other ICapabiltiesModule methods. |
79 | 79 | ||
80 | // scene.IncomingCloseAgent(sp.UUID, false); | ||
81 | // //Assert.That(capsMod.GetCapsForUser(spUuid), Is.Null); | ||
80 | scene.CloseAgent(sp.UUID, false); | 82 | scene.CloseAgent(sp.UUID, false); |
81 | Assert.That(capsMod.GetCapsForUser(spUuid), Is.Null); | 83 | // Assert.That(capsMod.GetCapsForUser(spUuid), Is.Null); |
82 | 84 | ||
83 | // TODO: Need to add tests for other ICapabiltiesModule methods. | 85 | // TODO: Need to add tests for other ICapabiltiesModule methods. |
84 | } | 86 | } |
85 | } | 87 | } |
86 | } \ No newline at end of file | 88 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs index 7127644..37eec52 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs | |||
@@ -190,7 +190,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
190 | // We need to set up the permisions module on scene B so that our later use of agent limit to deny | 190 | // We need to set up the permisions module on scene B so that our later use of agent limit to deny |
191 | // QueryAccess won't succeed anyway because administrators are always allowed in and the default | 191 | // QueryAccess won't succeed anyway because administrators are always allowed in and the default |
192 | // IsAdministrator if no permissions module is present is true. | 192 | // IsAdministrator if no permissions module is present is true. |
193 | SceneHelpers.SetupSceneModules(sceneB, config, new CapabilitiesModule(), new PermissionsModule(), etmB); | 193 | // SceneHelpers.SetupSceneModules(sceneB, config, new CapabilitiesModule(), new PermissionsModule(), etmB); |
194 | 194 | ||
195 | AgentCircuitData acd = SceneHelpers.GenerateAgentData(userId); | 195 | AgentCircuitData acd = SceneHelpers.GenerateAgentData(userId); |
196 | TestClient tc = new TestClient(acd, sceneA); | 196 | TestClient tc = new TestClient(acd, sceneA); |
@@ -244,4 +244,4 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
244 | Assert.That(spAfterCrossSceneB.IsChildAgent, Is.True); | 244 | Assert.That(spAfterCrossSceneB.IsChildAgent, Is.True); |
245 | } | 245 | } |
246 | } | 246 | } |
247 | } \ No newline at end of file | 247 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs index b232a44..64f11cd 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs | |||
@@ -98,9 +98,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
98 | 98 | ||
99 | Assert.That(part.SitTargetAvatar, Is.EqualTo(UUID.Zero)); | 99 | Assert.That(part.SitTargetAvatar, Is.EqualTo(UUID.Zero)); |
100 | Assert.That(part.GetSittingAvatarsCount(), Is.EqualTo(1)); | 100 | Assert.That(part.GetSittingAvatarsCount(), Is.EqualTo(1)); |
101 | HashSet<ScenePresence> sittingAvatars = part.GetSittingAvatars(); | 101 | HashSet<UUID> sittingAvatars = part.GetSittingAvatars(); |
102 | Assert.That(sittingAvatars.Count, Is.EqualTo(1)); | 102 | Assert.That(sittingAvatars.Count, Is.EqualTo(1)); |
103 | Assert.That(sittingAvatars.Contains(m_sp)); | 103 | Assert.That(sittingAvatars.Contains(m_sp.UUID)); |
104 | Assert.That(m_sp.ParentID, Is.EqualTo(part.LocalId)); | 104 | Assert.That(m_sp.ParentID, Is.EqualTo(part.LocalId)); |
105 | } | 105 | } |
106 | 106 | ||
@@ -210,9 +210,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
210 | Assert.That(m_sp.PhysicsActor, Is.Null); | 210 | Assert.That(m_sp.PhysicsActor, Is.Null); |
211 | 211 | ||
212 | Assert.That(part.GetSittingAvatarsCount(), Is.EqualTo(1)); | 212 | Assert.That(part.GetSittingAvatarsCount(), Is.EqualTo(1)); |
213 | HashSet<ScenePresence> sittingAvatars = part.GetSittingAvatars(); | 213 | HashSet<UUID> sittingAvatars = part.GetSittingAvatars(); |
214 | Assert.That(sittingAvatars.Count, Is.EqualTo(1)); | 214 | Assert.That(sittingAvatars.Count, Is.EqualTo(1)); |
215 | Assert.That(sittingAvatars.Contains(m_sp)); | 215 | Assert.That(sittingAvatars.Contains(m_sp.UUID)); |
216 | 216 | ||
217 | m_sp.StandUp(); | 217 | m_sp.StandUp(); |
218 | 218 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs index bacfc17..226ed6e 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs | |||
@@ -280,7 +280,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
280 | // We need to set up the permisions module on scene B so that our later use of agent limit to deny | 280 | // We need to set up the permisions module on scene B so that our later use of agent limit to deny |
281 | // QueryAccess won't succeed anyway because administrators are always allowed in and the default | 281 | // QueryAccess won't succeed anyway because administrators are always allowed in and the default |
282 | // IsAdministrator if no permissions module is present is true. | 282 | // IsAdministrator if no permissions module is present is true. |
283 | SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new PermissionsModule(), etmB }); | 283 | SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new DefaultPermissionsModule(), etmB }); |
284 | 284 | ||
285 | // Shared scene modules | 285 | // Shared scene modules |
286 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); | 286 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); |
@@ -445,7 +445,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
445 | // We need to set up the permisions module on scene B so that our later use of agent limit to deny | 445 | // We need to set up the permisions module on scene B so that our later use of agent limit to deny |
446 | // QueryAccess won't succeed anyway because administrators are always allowed in and the default | 446 | // QueryAccess won't succeed anyway because administrators are always allowed in and the default |
447 | // IsAdministrator if no permissions module is present is true. | 447 | // IsAdministrator if no permissions module is present is true. |
448 | SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new PermissionsModule(), etmB }); | 448 | SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new DefaultPermissionsModule(), etmB }); |
449 | 449 | ||
450 | // Shared scene modules | 450 | // Shared scene modules |
451 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); | 451 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); |
@@ -658,4 +658,4 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
658 | // TestHelpers.DisableLogging(); | 658 | // TestHelpers.DisableLogging(); |
659 | } | 659 | } |
660 | } | 660 | } |
661 | } \ No newline at end of file | 661 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs index b01088d..33a630c 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs | |||
@@ -95,7 +95,7 @@ namespace OpenSim.Region.Framework.Tests | |||
95 | Quaternion rezRot = new Quaternion(0.5f, 0.5f, 0.5f, 0.5f); | 95 | Quaternion rezRot = new Quaternion(0.5f, 0.5f, 0.5f, 0.5f); |
96 | Vector3 rezVel = new Vector3(2, 2, 2); | 96 | Vector3 rezVel = new Vector3(2, 2, 2); |
97 | 97 | ||
98 | scene.RezObject(sop1, taskSceneObjectItem, rezPos, rezRot, rezVel, 0); | 98 | scene.RezObject(sop1, taskSceneObjectItem, rezPos, rezRot, rezVel, 0,false); |
99 | 99 | ||
100 | SceneObjectGroup rezzedObject = scene.GetSceneObjectGroup("tso"); | 100 | SceneObjectGroup rezzedObject = scene.GetSceneObjectGroup("tso"); |
101 | 101 | ||