From a03d893f2c431c220f44a6f7c1b94de7568bd6f8 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 25 Feb 2015 21:12:46 +0000
Subject: Fix bug where the uuid gatherer was not inspecting UUIDs for items in
an embedded object's inventory.
Added regression test for this case.
Likely a regression since 08606ae4 (Thu Jan 8 2015)
Relates to Mantises 7439, 7450 and possibly others.
---
.../Tests/Common/Helpers/TaskInventoryHelpers.cs | 45 ++++++++++++++++------
1 file changed, 33 insertions(+), 12 deletions(-)
(limited to 'OpenSim/Tests/Common/Helpers/TaskInventoryHelpers.cs')
diff --git a/OpenSim/Tests/Common/Helpers/TaskInventoryHelpers.cs b/OpenSim/Tests/Common/Helpers/TaskInventoryHelpers.cs
index a15127e..3a3b33a 100644
--- a/OpenSim/Tests/Common/Helpers/TaskInventoryHelpers.cs
+++ b/OpenSim/Tests/Common/Helpers/TaskInventoryHelpers.cs
@@ -153,7 +153,6 @@ namespace OpenSim.Tests.Common
return item;
}
-
///
/// Add a scene object item to the given part.
///
@@ -165,25 +164,47 @@ namespace OpenSim.Tests.Common
///
///
///
- ///
- ///
+ ///
+ ///
+ ///
public static TaskInventoryItem AddSceneObject(
- IAssetService assetService, SceneObjectPart sop, string itemName, UUID id, UUID userId)
+ IAssetService assetService, SceneObjectPart sop, string itemName, UUID itemId, SceneObjectGroup soToAdd, UUID soAssetId)
{
- SceneObjectGroup taskSceneObject = SceneHelpers.CreateSceneObject(1, UUID.Zero);
- AssetBase taskSceneObjectAsset = AssetHelpers.CreateAsset(0x10, taskSceneObject);
+ AssetBase taskSceneObjectAsset = AssetHelpers.CreateAsset(soAssetId, soToAdd);
assetService.Store(taskSceneObjectAsset);
TaskInventoryItem taskSceneObjectItem
= new TaskInventoryItem
- { Name = itemName,
- AssetID = taskSceneObjectAsset.FullID,
- ItemID = id,
- OwnerID = userId,
- Type = (int)AssetType.Object,
- InvType = (int)InventoryType.Object };
+ { Name = itemName,
+ AssetID = taskSceneObjectAsset.FullID,
+ ItemID = itemId,
+ OwnerID = soToAdd.OwnerID,
+ Type = (int)AssetType.Object,
+ InvType = (int)InventoryType.Object };
sop.Inventory.AddInventoryItem(taskSceneObjectItem, true);
return taskSceneObjectItem;
}
+
+ ///
+ /// Add a scene object item to the given part.
+ ///
+ ///
+ /// TODO: Accept input for item and asset IDs to avoid mysterious script failures that try to use any of these
+ /// functions more than once in a test.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static TaskInventoryItem AddSceneObject(
+ IAssetService assetService, SceneObjectPart sop, string itemName, UUID itemId, UUID userId)
+ {
+ SceneObjectGroup taskSceneObject = SceneHelpers.CreateSceneObject(1, userId);
+
+ return TaskInventoryHelpers.AddSceneObject(
+ assetService, sop, itemName, itemId, taskSceneObject, TestHelpers.ParseTail(0x10));
+ }
}
}
\ No newline at end of file
--
cgit v1.1