diff options
Diffstat (limited to '')
7 files changed, 28 insertions, 26 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs index 558ba2c..b7e9499 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs | |||
@@ -82,8 +82,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
82 | UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); | 82 | UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); |
83 | 83 | ||
84 | TestScene scene = new SceneHelpers().SetupScene(); | 84 | TestScene scene = new SceneHelpers().SetupScene(); |
85 | SceneHelpers.SetupSceneModules(scene, new PermissionsModule()); | 85 | IConfigSource configSource = new IniConfigSource(); |
86 | TestClient client = (TestClient)SceneHelpers.AddScenePresence(scene, userId).ControllingClient; | 86 | IConfig config = configSource.AddConfig("Startup"); |
87 | config.Set("serverside_object_permissions", true); | ||
88 | SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() }); | ||
89 | IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; | ||
87 | 90 | ||
88 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. | 91 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. |
89 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; | 92 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; |
@@ -105,9 +108,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
105 | 108 | ||
106 | SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); | 109 | SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); |
107 | Assert.That(retrievedPart2, Is.Null); | 110 | Assert.That(retrievedPart2, Is.Null); |
108 | |||
109 | Assert.That(client.ReceivedKills.Count, Is.EqualTo(1)); | ||
110 | Assert.That(client.ReceivedKills[0], Is.EqualTo(soLocalId)); | ||
111 | } | 111 | } |
112 | 112 | ||
113 | /// <summary> | 113 | /// <summary> |
@@ -134,7 +134,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
134 | SceneHelpers.SetupSceneModules(sceneB, config, etmB); | 134 | SceneHelpers.SetupSceneModules(sceneB, config, etmB); |
135 | 135 | ||
136 | // We need this for derez | 136 | // We need this for derez |
137 | SceneHelpers.SetupSceneModules(sceneA, new PermissionsModule()); | 137 | //SceneHelpers.SetupSceneModules(sceneA, new PermissionsModule()); |
138 | 138 | ||
139 | UserAccount uaA = UserAccountHelpers.CreateUserWithInventory(sceneA, "Andy", "AAA", 0x1, ""); | 139 | UserAccount uaA = UserAccountHelpers.CreateUserWithInventory(sceneA, "Andy", "AAA", 0x1, ""); |
140 | UserAccount uaB = UserAccountHelpers.CreateUserWithInventory(sceneA, "Brian", "BBB", 0x2, ""); | 140 | UserAccount uaB = UserAccountHelpers.CreateUserWithInventory(sceneA, "Brian", "BBB", 0x2, ""); |
@@ -154,12 +154,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
154 | uint soLocalId = so.LocalId; | 154 | uint soLocalId = so.LocalId; |
155 | 155 | ||
156 | sceneA.DeleteSceneObject(so, false); | 156 | sceneA.DeleteSceneObject(so, false); |
157 | |||
158 | Assert.That(clientA.ReceivedKills.Count, Is.EqualTo(1)); | ||
159 | Assert.That(clientA.ReceivedKills[0], Is.EqualTo(soLocalId)); | ||
160 | |||
161 | Assert.That(childClientsB[0].ReceivedKills.Count, Is.EqualTo(1)); | ||
162 | Assert.That(childClientsB[0].ReceivedKills[0], Is.EqualTo(soLocalId)); | ||
163 | } | 157 | } |
164 | 158 | ||
165 | /// <summary> | 159 | /// <summary> |
@@ -178,7 +172,10 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
178 | UUID objectOwnerId = UUID.Parse("20000000-0000-0000-0000-000000000001"); | 172 | UUID objectOwnerId = UUID.Parse("20000000-0000-0000-0000-000000000001"); |
179 | 173 | ||
180 | TestScene scene = new SceneHelpers().SetupScene(); | 174 | TestScene scene = new SceneHelpers().SetupScene(); |
181 | SceneHelpers.SetupSceneModules(scene, new PermissionsModule()); | 175 | IConfigSource configSource = new IniConfigSource(); |
176 | IConfig config = configSource.AddConfig("Startup"); | ||
177 | config.Set("serverside_object_permissions", true); | ||
178 | SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() }); | ||
182 | IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; | 179 | IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; |
183 | 180 | ||
184 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. | 181 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. |
@@ -261,4 +258,4 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
261 | // Assert.That(retrievedPart, Is.Null); | 258 | // Assert.That(retrievedPart, Is.Null); |
262 | } | 259 | } |
263 | } | 260 | } |
264 | } \ No newline at end of file | 261 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectResizeTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectResizeTests.cs index 11e9084..ce7fc0e 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectResizeTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectResizeTests.cs | |||
@@ -61,6 +61,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
61 | Assert.That(g1Post.RootPart.Scale.X, Is.EqualTo(2)); | 61 | Assert.That(g1Post.RootPart.Scale.X, Is.EqualTo(2)); |
62 | Assert.That(g1Post.RootPart.Scale.Y, Is.EqualTo(3)); | 62 | Assert.That(g1Post.RootPart.Scale.Y, Is.EqualTo(3)); |
63 | Assert.That(g1Post.RootPart.Scale.Z, Is.EqualTo(4)); | 63 | Assert.That(g1Post.RootPart.Scale.Z, Is.EqualTo(4)); |
64 | |||
65 | Assert.That(g1Post.RootPart.UndoCount, Is.EqualTo(1)); | ||
64 | } | 66 | } |
65 | 67 | ||
66 | /// <summary> | 68 | /// <summary> |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs index fd49c88..32d6649 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs | |||
@@ -43,7 +43,7 @@ using OpenSim.Tests.Common; | |||
43 | namespace OpenSim.Region.Framework.Scenes.Tests | 43 | namespace OpenSim.Region.Framework.Scenes.Tests |
44 | { | 44 | { |
45 | [TestFixture] | 45 | [TestFixture] |
46 | public class SceneObjectUserGroupTests : OpenSimTestCase | 46 | public class SceneObjectUserGroupTests |
47 | { | 47 | { |
48 | /// <summary> | 48 | /// <summary> |
49 | /// Test share with group object functionality | 49 | /// Test share with group object functionality |
@@ -53,6 +53,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
53 | public void TestShareWithGroup() | 53 | public void TestShareWithGroup() |
54 | { | 54 | { |
55 | TestHelpers.InMethod(); | 55 | TestHelpers.InMethod(); |
56 | // log4net.Config.XmlConfigurator.Configure(); | ||
56 | 57 | ||
57 | UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); | 58 | UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); |
58 | 59 | ||
@@ -69,7 +70,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
69 | 70 | ||
70 | SceneHelpers.SetupSceneModules( | 71 | SceneHelpers.SetupSceneModules( |
71 | scene, configSource, new object[] | 72 | scene, configSource, new object[] |
72 | { new PermissionsModule(), | 73 | { new DefaultPermissionsModule(), |
73 | new GroupsModule(), | 74 | new GroupsModule(), |
74 | new MockGroupsServicesConnector() }); | 75 | new MockGroupsServicesConnector() }); |
75 | 76 | ||
@@ -80,4 +81,4 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
80 | groupsModule.CreateGroup(client, "group1", "To boldly go", true, UUID.Zero, 5, true, true, true); | 81 | groupsModule.CreateGroup(client, "group1", "To boldly go", true, UUID.Zero, 5, true, true, true); |
81 | } | 82 | } |
82 | } | 83 | } |
83 | } \ No newline at end of file | 84 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCapabilityTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCapabilityTests.cs index cca30db..45bfbff 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCapabilityTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCapabilityTests.cs | |||
@@ -74,14 +74,16 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
74 | SceneHelpers.SetupSceneModules(scene, capsMod); | 74 | SceneHelpers.SetupSceneModules(scene, capsMod); |
75 | 75 | ||
76 | ScenePresence sp = SceneHelpers.AddChildScenePresence(scene, spUuid); | 76 | ScenePresence sp = SceneHelpers.AddChildScenePresence(scene, spUuid); |
77 | Assert.That(capsMod.GetCapsForUser(spUuid), Is.Not.Null); | 77 | //Assert.That(capsMod.GetCapsForUser(spUuid), Is.Not.Null); |
78 | 78 | ||
79 | // TODO: Need to add tests for other ICapabiltiesModule methods. | 79 | // TODO: Need to add tests for other ICapabiltiesModule methods. |
80 | 80 | ||
81 | // scene.IncomingCloseAgent(sp.UUID, false); | ||
82 | // //Assert.That(capsMod.GetCapsForUser(spUuid), Is.Null); | ||
81 | scene.CloseAgent(sp.UUID, false); | 83 | scene.CloseAgent(sp.UUID, false); |
82 | Assert.That(capsMod.GetCapsForUser(spUuid), Is.Null); | 84 | // Assert.That(capsMod.GetCapsForUser(spUuid), Is.Null); |
83 | 85 | ||
84 | // TODO: Need to add tests for other ICapabiltiesModule methods. | 86 | // TODO: Need to add tests for other ICapabiltiesModule methods. |
85 | } | 87 | } |
86 | } | 88 | } |
87 | } \ No newline at end of file | 89 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs index e14da8b..c193a97 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs | |||
@@ -191,7 +191,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
191 | // We need to set up the permisions module on scene B so that our later use of agent limit to deny | 191 | // We need to set up the permisions module on scene B so that our later use of agent limit to deny |
192 | // QueryAccess won't succeed anyway because administrators are always allowed in and the default | 192 | // QueryAccess won't succeed anyway because administrators are always allowed in and the default |
193 | // IsAdministrator if no permissions module is present is true. | 193 | // IsAdministrator if no permissions module is present is true. |
194 | SceneHelpers.SetupSceneModules(sceneB, config, new CapabilitiesModule(), new PermissionsModule(), etmB); | 194 | // SceneHelpers.SetupSceneModules(sceneB, config, new CapabilitiesModule(), new PermissionsModule(), etmB); |
195 | 195 | ||
196 | AgentCircuitData acd = SceneHelpers.GenerateAgentData(userId); | 196 | AgentCircuitData acd = SceneHelpers.GenerateAgentData(userId); |
197 | TestClient tc = new TestClient(acd, sceneA); | 197 | TestClient tc = new TestClient(acd, sceneA); |
@@ -245,4 +245,4 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
245 | Assert.That(spAfterCrossSceneB.IsChildAgent, Is.True); | 245 | Assert.That(spAfterCrossSceneB.IsChildAgent, Is.True); |
246 | } | 246 | } |
247 | } | 247 | } |
248 | } \ No newline at end of file | 248 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs index da93d44..42276dd 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs | |||
@@ -281,7 +281,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
281 | // We need to set up the permisions module on scene B so that our later use of agent limit to deny | 281 | // We need to set up the permisions module on scene B so that our later use of agent limit to deny |
282 | // QueryAccess won't succeed anyway because administrators are always allowed in and the default | 282 | // QueryAccess won't succeed anyway because administrators are always allowed in and the default |
283 | // IsAdministrator if no permissions module is present is true. | 283 | // IsAdministrator if no permissions module is present is true. |
284 | SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new PermissionsModule(), etmB }); | 284 | SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new DefaultPermissionsModule(), etmB }); |
285 | 285 | ||
286 | // Shared scene modules | 286 | // Shared scene modules |
287 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); | 287 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); |
@@ -446,7 +446,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
446 | // We need to set up the permisions module on scene B so that our later use of agent limit to deny | 446 | // We need to set up the permisions module on scene B so that our later use of agent limit to deny |
447 | // QueryAccess won't succeed anyway because administrators are always allowed in and the default | 447 | // QueryAccess won't succeed anyway because administrators are always allowed in and the default |
448 | // IsAdministrator if no permissions module is present is true. | 448 | // IsAdministrator if no permissions module is present is true. |
449 | SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new PermissionsModule(), etmB }); | 449 | SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new DefaultPermissionsModule(), etmB }); |
450 | 450 | ||
451 | // Shared scene modules | 451 | // Shared scene modules |
452 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); | 452 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); |
@@ -659,4 +659,4 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
659 | // TestHelpers.DisableLogging(); | 659 | // TestHelpers.DisableLogging(); |
660 | } | 660 | } |
661 | } | 661 | } |
662 | } \ No newline at end of file | 662 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs index 8ec6974..3caea8b 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs | |||
@@ -96,7 +96,7 @@ namespace OpenSim.Region.Framework.Tests | |||
96 | Quaternion rezRot = new Quaternion(0.5f, 0.5f, 0.5f, 0.5f); | 96 | Quaternion rezRot = new Quaternion(0.5f, 0.5f, 0.5f, 0.5f); |
97 | Vector3 rezVel = new Vector3(2, 2, 2); | 97 | Vector3 rezVel = new Vector3(2, 2, 2); |
98 | 98 | ||
99 | scene.RezObject(sop1, taskSceneObjectItem, rezPos, rezRot, rezVel, 0); | 99 | scene.RezObject(sop1, taskSceneObjectItem, rezPos, rezRot, rezVel, 0,false); |
100 | 100 | ||
101 | SceneObjectGroup rezzedObject = scene.GetSceneObjectGroup("tso"); | 101 | SceneObjectGroup rezzedObject = scene.GetSceneObjectGroup("tso"); |
102 | 102 | ||