diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs index f0debd0..b84ecac 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs | |||
@@ -77,19 +77,19 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
77 | public void TestDeRezSceneObject() | 77 | public void TestDeRezSceneObject() |
78 | { | 78 | { |
79 | TestHelpers.InMethod(); | 79 | TestHelpers.InMethod(); |
80 | 80 | ||
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 | IConfigSource configSource = new IniConfigSource(); | 84 | IConfigSource configSource = new IniConfigSource(); |
85 | IConfig config = configSource.AddConfig("Startup"); | 85 | IConfig config = configSource.AddConfig("Startup"); |
86 | config.Set("serverside_object_permissions", true); | 86 | config.Set("serverside_object_permissions", true); |
87 | SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() }); | 87 | SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() }); |
88 | IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; | 88 | IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; |
89 | 89 | ||
90 | // 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. |
91 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; | 91 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; |
92 | sogd.Enabled = false; | 92 | sogd.Enabled = false; |
93 | 93 | ||
94 | SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", userId); | 94 | SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", userId); |
95 | uint soLocalId = so.LocalId; | 95 | uint soLocalId = so.LocalId; |
@@ -104,9 +104,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
104 | // Assert.That(retrievedPart.ParentGroup.IsDeleted, Is.False); | 104 | // Assert.That(retrievedPart.ParentGroup.IsDeleted, Is.False); |
105 | 105 | ||
106 | sogd.InventoryDeQueueAndDelete(); | 106 | sogd.InventoryDeQueueAndDelete(); |
107 | 107 | ||
108 | // SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); | 108 | // SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); |
109 | Assert.That(retrievedPart, Is.Null); | 109 | Assert.That(retrievedPart, Is.Null); |
110 | } | 110 | } |
111 | 111 | ||
112 | /// <summary> | 112 | /// <summary> |
@@ -154,48 +154,48 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
154 | 154 | ||
155 | sceneA.DeleteSceneObject(so, false); | 155 | sceneA.DeleteSceneObject(so, false); |
156 | } | 156 | } |
157 | 157 | ||
158 | /// <summary> | 158 | /// <summary> |
159 | /// Test deleting an object from a scene where the deleter is not the owner | 159 | /// Test deleting an object from a scene where the deleter is not the owner |
160 | /// </summary> | 160 | /// </summary> |
161 | /// <remarks> | 161 | /// <remarks> |
162 | /// This test assumes that the deleter is not a god. | 162 | /// This test assumes that the deleter is not a god. |
163 | /// </remarks> | 163 | /// </remarks> |
164 | [Test] | 164 | [Test] |
165 | public void TestDeRezSceneObjectNotOwner() | 165 | public void TestDeRezSceneObjectNotOwner() |
166 | { | 166 | { |
167 | TestHelpers.InMethod(); | 167 | TestHelpers.InMethod(); |
168 | // log4net.Config.XmlConfigurator.Configure(); | 168 | // log4net.Config.XmlConfigurator.Configure(); |
169 | 169 | ||
170 | UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); | 170 | UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); |
171 | UUID objectOwnerId = UUID.Parse("20000000-0000-0000-0000-000000000001"); | 171 | UUID objectOwnerId = UUID.Parse("20000000-0000-0000-0000-000000000001"); |
172 | 172 | ||
173 | TestScene scene = new SceneHelpers().SetupScene(); | 173 | TestScene scene = new SceneHelpers().SetupScene(); |
174 | IConfigSource configSource = new IniConfigSource(); | 174 | IConfigSource configSource = new IniConfigSource(); |
175 | IConfig config = configSource.AddConfig("Startup"); | 175 | IConfig config = configSource.AddConfig("Startup"); |
176 | config.Set("serverside_object_permissions", true); | 176 | config.Set("serverside_object_permissions", true); |
177 | SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() }); | 177 | SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() }); |
178 | IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; | 178 | IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; |
179 | 179 | ||
180 | // 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. |
181 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; | 181 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; |
182 | sogd.Enabled = false; | 182 | sogd.Enabled = false; |
183 | 183 | ||
184 | SceneObjectPart part | 184 | SceneObjectPart part |
185 | = new SceneObjectPart(objectOwnerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero); | 185 | = new SceneObjectPart(objectOwnerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero); |
186 | part.Name = "obj1"; | 186 | part.Name = "obj1"; |
187 | scene.AddNewSceneObject(new SceneObjectGroup(part), false); | 187 | scene.AddNewSceneObject(new SceneObjectGroup(part), false); |
188 | List<uint> localIds = new List<uint>(); | 188 | List<uint> localIds = new List<uint>(); |
189 | localIds.Add(part.LocalId); | 189 | localIds.Add(part.LocalId); |
190 | 190 | ||
191 | scene.DeRezObjects(client, localIds, UUID.Zero, DeRezAction.Delete, UUID.Zero); | 191 | scene.DeRezObjects(client, localIds, UUID.Zero, DeRezAction.Delete, UUID.Zero); |
192 | sogd.InventoryDeQueueAndDelete(); | 192 | sogd.InventoryDeQueueAndDelete(); |
193 | 193 | ||
194 | // Object should still be in the scene. | 194 | // Object should still be in the scene. |
195 | SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); | 195 | SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); |
196 | Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID)); | 196 | Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID)); |
197 | } | 197 | } |
198 | 198 | ||
199 | /// <summary> | 199 | /// <summary> |
200 | /// Test deleting an object asynchronously to user inventory. | 200 | /// Test deleting an object asynchronously to user inventory. |
201 | /// </summary> | 201 | /// </summary> |
@@ -211,7 +211,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
211 | TestScene scene = new SceneHelpers().SetupScene(); | 211 | TestScene scene = new SceneHelpers().SetupScene(); |
212 | 212 | ||
213 | IConfigSource configSource = new IniConfigSource(); | 213 | IConfigSource configSource = new IniConfigSource(); |
214 | IConfig config = configSource.AddConfig("Modules"); | 214 | IConfig config = configSource.AddConfig("Modules"); |
215 | config.Set("InventoryAccessModule", "BasicInventoryAccessModule"); | 215 | config.Set("InventoryAccessModule", "BasicInventoryAccessModule"); |
216 | SceneHelpers.SetupSceneModules( | 216 | SceneHelpers.SetupSceneModules( |
217 | scene, configSource, new object[] { new BasicInventoryAccessModule() }); | 217 | scene, configSource, new object[] { new BasicInventoryAccessModule() }); |