aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs
diff options
context:
space:
mode:
authoronefang2019-05-19 21:24:15 +1000
committeronefang2019-05-19 21:24:15 +1000
commit5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch)
treea9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs
parentAdd a build script. (diff)
downloadopensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip
opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz
opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2
opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs21
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;
39using OpenSim.Region.CoreModules.Avatar.AvatarFactory; 39using OpenSim.Region.CoreModules.Avatar.AvatarFactory;
40using OpenSim.Region.OptionalModules.World.NPC; 40using OpenSim.Region.OptionalModules.World.NPC;
41using OpenSim.Region.Framework.Scenes; 41using OpenSim.Region.Framework.Scenes;
42using OpenSim.Region.CoreModules.World.Permissions;
42using OpenSim.Region.ScriptEngine.Shared; 43using OpenSim.Region.ScriptEngine.Shared;
43using OpenSim.Region.ScriptEngine.Shared.Api; 44using OpenSim.Region.ScriptEngine.Shared.Api;
44using OpenSim.Region.ScriptEngine.Shared.Instance; 45using 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