diff options
author | onefang | 2019-09-11 16:36:50 +1000 |
---|---|---|
committer | onefang | 2019-09-11 16:36:50 +1000 |
commit | 50cd1ffd32f69228e566f2b0b89f86ea0d9fe489 (patch) | |
tree | 52f2ab0c04f1a5d7d6ac5dc872981b4b156447e7 /OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs | |
parent | Renamed branch to SledjChisl. (diff) | |
parent | Bump to release flavour, build 0. (diff) | |
download | opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.zip opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.gz opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.bz2 opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.xz |
Merge branch 'SledjChisl'
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs index 9b7cab2..16b87b3 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs | |||
@@ -39,6 +39,7 @@ using OpenSim.Framework; | |||
39 | using OpenSim.Region.CoreModules.Avatar.AvatarFactory; | 39 | using OpenSim.Region.CoreModules.Avatar.AvatarFactory; |
40 | using OpenSim.Region.OptionalModules.World.NPC; | 40 | using OpenSim.Region.OptionalModules.World.NPC; |
41 | using OpenSim.Region.Framework.Scenes; | 41 | using OpenSim.Region.Framework.Scenes; |
42 | using OpenSim.Region.CoreModules.World.Permissions; | ||
42 | using OpenSim.Region.ScriptEngine.Shared; | 43 | using OpenSim.Region.ScriptEngine.Shared; |
43 | using OpenSim.Region.ScriptEngine.Shared.Api; | 44 | using OpenSim.Region.ScriptEngine.Shared.Api; |
44 | using OpenSim.Region.ScriptEngine.Shared.Instance; | 45 | using OpenSim.Region.ScriptEngine.Shared.Instance; |
@@ -63,12 +64,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
63 | base.SetUp(); | 64 | base.SetUp(); |
64 | 65 | ||
65 | IConfigSource initConfigSource = new IniConfigSource(); | 66 | IConfigSource initConfigSource = new IniConfigSource(); |
66 | IConfig config = initConfigSource.AddConfig("XEngine"); | 67 | IConfig config = initConfigSource.AddConfig("Startup"); |
68 | config.Set("serverside_object_permissions", true); | ||
69 | config =initConfigSource.AddConfig("Permissions"); | ||
70 | config.Set("permissionmodules", "DefaultPermissionsModule"); | ||
71 | config.Set("serverside_object_permissions", true); | ||
72 | config.Set("propagate_permissions", true); | ||
73 | |||
74 | config = initConfigSource.AddConfig("XEngine"); | ||
67 | config.Set("Enabled", "true"); | 75 | config.Set("Enabled", "true"); |
68 | 76 | ||
69 | m_scene = new SceneHelpers().SetupScene(); | 77 | m_scene = new SceneHelpers().SetupScene(); |
70 | SceneHelpers.SetupSceneModules(m_scene, initConfigSource); | 78 | SceneHelpers.SetupSceneModules(m_scene, initConfigSource, new object[] { new DefaultPermissionsModule() }); |
71 | |||
72 | m_engine = new XEngine.XEngine(); | 79 | m_engine = new XEngine.XEngine(); |
73 | m_engine.Initialise(initConfigSource); | 80 | m_engine.Initialise(initConfigSource); |
74 | m_engine.AddRegion(m_scene); | 81 | m_engine.AddRegion(m_scene); |
@@ -160,7 +167,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
160 | // Item has copy permissions so original should stay intact. | 167 | // Item has copy permissions so original should stay intact. |
161 | List<TaskInventoryItem> originalItems = so1.RootPart.Inventory.GetInventoryItems(); | 168 | List<TaskInventoryItem> originalItems = so1.RootPart.Inventory.GetInventoryItems(); |
162 | Assert.That(originalItems.Count, Is.EqualTo(1)); | 169 | Assert.That(originalItems.Count, Is.EqualTo(1)); |
163 | 170 | ||
164 | // Should now have copied. | 171 | // Should now have copied. |
165 | List<TaskInventoryItem> copiedItems = so2.RootPart.Inventory.GetInventoryItems(inventoryItemName); | 172 | List<TaskInventoryItem> copiedItems = so2.RootPart.Inventory.GetInventoryItems(inventoryItemName); |
166 | Assert.That(copiedItems.Count, Is.EqualTo(1)); | 173 | Assert.That(copiedItems.Count, Is.EqualTo(1)); |
@@ -194,7 +201,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
194 | 201 | ||
195 | api.llGiveInventory(user2Id.ToString(), inventoryItemName); | 202 | api.llGiveInventory(user2Id.ToString(), inventoryItemName); |
196 | 203 | ||
197 | InventoryItemBase receivedItem | 204 | InventoryItemBase receivedItem |
198 | = UserInventoryHelpers.GetInventoryItem( | 205 | = UserInventoryHelpers.GetInventoryItem( |
199 | m_scene.InventoryService, user2Id, string.Format("Objects/{0}", inventoryItemName)); | 206 | m_scene.InventoryService, user2Id, string.Format("Objects/{0}", inventoryItemName)); |
200 | 207 | ||
@@ -222,7 +229,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
222 | 229 | ||
223 | // Create an object embedded inside the first | 230 | // Create an object embedded inside the first |
224 | UUID itemId = TestHelpers.ParseTail(0x20); | 231 | UUID itemId = TestHelpers.ParseTail(0x20); |
225 | TaskInventoryItem tii | 232 | TaskInventoryItem tii |
226 | = TaskInventoryHelpers.AddSceneObject(m_scene.AssetService, so1.RootPart, inventoryItemName, itemId, user1Id); | 233 | = TaskInventoryHelpers.AddSceneObject(m_scene.AssetService, so1.RootPart, inventoryItemName, itemId, user1Id); |
227 | tii.NextPermissions &= ~((uint)PermissionMask.Modify); | 234 | tii.NextPermissions &= ~((uint)PermissionMask.Modify); |
228 | 235 | ||
@@ -230,7 +237,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
230 | 237 | ||
231 | api.llGiveInventory(user2Id.ToString(), inventoryItemName); | 238 | api.llGiveInventory(user2Id.ToString(), inventoryItemName); |
232 | 239 | ||
233 | InventoryItemBase receivedItem | 240 | InventoryItemBase receivedItem |
234 | = UserInventoryHelpers.GetInventoryItem( | 241 | = UserInventoryHelpers.GetInventoryItem( |
235 | m_scene.InventoryService, user2Id, string.Format("Objects/{0}", inventoryItemName)); | 242 | m_scene.InventoryService, user2Id, string.Format("Objects/{0}", inventoryItemName)); |
236 | 243 | ||