diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index 938886b2..2747e15 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | |||
@@ -38,7 +38,6 @@ using OpenSim.Framework; | |||
38 | using OpenSim.Framework.Serialization; | 38 | using OpenSim.Framework.Serialization; |
39 | using OpenSim.Framework.Serialization.External; | 39 | using OpenSim.Framework.Serialization.External; |
40 | using OpenSim.Framework.Communications; | 40 | using OpenSim.Framework.Communications; |
41 | using OpenSim.Framework.Communications.Osp; | ||
42 | using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; | 41 | using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; |
43 | using OpenSim.Region.CoreModules.World.Serialiser; | 42 | using OpenSim.Region.CoreModules.World.Serialiser; |
44 | using OpenSim.Region.Framework.Scenes; | 43 | using OpenSim.Region.Framework.Scenes; |
@@ -96,14 +95,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
96 | item1.Name = m_item1Name; | 95 | item1.Name = m_item1Name; |
97 | item1.AssetID = UUID.Random(); | 96 | item1.AssetID = UUID.Random(); |
98 | item1.GroupID = UUID.Random(); | 97 | item1.GroupID = UUID.Random(); |
99 | item1.CreatorId = OspResolver.MakeOspa(m_ua2.FirstName, m_ua2.LastName); | 98 | //item1.CreatorId = OspResolver.MakeOspa(m_ua2.FirstName, m_ua2.LastName); |
100 | //item1.CreatorId = userUuid.ToString(); | 99 | //item1.CreatorId = userUuid.ToString(); |
101 | //item1.CreatorId = "00000000-0000-0000-0000-000000000444"; | 100 | item1.CreatorId = m_ua2.PrincipalID.ToString(); |
102 | item1.Owner = UUID.Zero; | 101 | item1.Owner = UUID.Zero; |
103 | 102 | ||
103 | Scene scene = SceneSetupHelpers.SetupScene("Inventory"); | ||
104 | UserProfileTestUtils.CreateUserWithInventory(scene, m_ua2, "hampshire"); | ||
105 | |||
104 | string item1FileName | 106 | string item1FileName |
105 | = string.Format("{0}{1}", ArchiveConstants.INVENTORY_PATH, archiveItemName); | 107 | = string.Format("{0}{1}", ArchiveConstants.INVENTORY_PATH, archiveItemName); |
106 | tar.WriteFile(item1FileName, UserInventoryItemSerializer.Serialize(item1)); | 108 | tar.WriteFile(item1FileName, UserInventoryItemSerializer.Serialize(item1, new Dictionary<string, object>(), scene.UserAccountService)); |
107 | tar.Close(); | 109 | tar.Close(); |
108 | m_iarStream = new MemoryStream(archiveWriteStream.ToArray()); | 110 | m_iarStream = new MemoryStream(archiveWriteStream.ToArray()); |
109 | } | 111 | } |
@@ -386,7 +388,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
386 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); | 388 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); |
387 | 389 | ||
388 | SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); | 390 | SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); |
389 | 391 | ||
390 | UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "meowfood"); | 392 | UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "meowfood"); |
391 | UserProfileTestUtils.CreateUserWithInventory(scene, m_ua2, "hampshire"); | 393 | UserProfileTestUtils.CreateUserWithInventory(scene, m_ua2, "hampshire"); |
392 | 394 | ||
@@ -551,7 +553,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
551 | 553 | ||
552 | string item1FileName | 554 | string item1FileName |
553 | = string.Format("{0}{1}", ArchiveConstants.INVENTORY_PATH, archiveItemName); | 555 | = string.Format("{0}{1}", ArchiveConstants.INVENTORY_PATH, archiveItemName); |
554 | tar.WriteFile(item1FileName, UserInventoryItemSerializer.Serialize(item1)); | 556 | tar.WriteFile(item1FileName, UserInventoryItemSerializer.Serialize(item1, new Dictionary<string,object>(), null)); |
555 | tar.Close(); | 557 | tar.Close(); |
556 | 558 | ||
557 | MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray()); | 559 | MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray()); |