From 4dd60b7dce4421bec89e9964a3fb51a1658945ad Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 10 Mar 2011 00:19:17 +0000
Subject: Change existing users load iar test so that it fulfills it's original
intention (i.e. OSPA resolution, which is still active).
Will need to write a separate test for the simplest case where creator accounts with appropriate uuids exist on iar load.
---
.../Archiver/Tests/InventoryArchiveTestCase.cs | 7 ++++++-
.../Archiver/Tests/InventoryArchiverTests.cs | 19 +++++++++----------
2 files changed, 15 insertions(+), 11 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs
index ca5bc53..dcafc49 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs
@@ -72,7 +72,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
= new UserAccount {
PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000666"),
FirstName = "Lord",
- LastName = "Lucan" };
+ LastName = "Lucan" };
+ protected UserAccount m_ua3
+ = new UserAccount {
+ PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000777"),
+ FirstName = "Lord",
+ LastName = "Lucan" };
protected string m_item1Name = "Ray Gun Item";
[SetUp]
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
index 5f75c4a..b52014b 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
@@ -170,10 +170,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
///
/// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where
- /// an account exists with the creator name.
+ /// an account exists with the same name as the creator, though not the same id.
///
[Test]
- public void TestLoadIarV0_1ExistingUsers()
+ public void TestLoadIarV0_1SameNameCreator()
{
TestHelper.InMethod();
// log4net.Config.XmlConfigurator.Configure();
@@ -187,7 +187,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule);
UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "meowfood");
- UserProfileTestUtils.CreateUserWithInventory(scene, m_ua2, "hampshire");
+ UserProfileTestUtils.CreateUserWithInventory(scene, m_ua3, "hampshire");
archiverModule.DearchiveInventory(m_ua1.FirstName, m_ua1.LastName, "/", "meowfood", m_iarStream);
InventoryItemBase foundItem1
@@ -198,12 +198,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
// Assert.That(
// foundItem1.CreatorId, Is.EqualTo(item1.CreatorId),
// "Loaded item non-uuid creator doesn't match original");
-// Assert.That(
-// foundItem1.CreatorId, Is.EqualTo(m_ua2.PrincipalID.ToString()),
-// "Loaded item non-uuid creator doesn't match original");
-
Assert.That(
- foundItem1.CreatorIdAsUuid, Is.EqualTo(m_ua2.PrincipalID),
+ foundItem1.CreatorId, Is.EqualTo(m_ua3.PrincipalID.ToString()),
+ "Loaded item non-uuid creator doesn't match original");
+ Assert.That(
+ foundItem1.CreatorIdAsUuid, Is.EqualTo(m_ua3.PrincipalID),
"Loaded item uuid creator doesn't match original");
Assert.That(foundItem1.Owner, Is.EqualTo(m_ua1.PrincipalID),
"Loaded item owner doesn't match inventory reciever");
@@ -211,10 +210,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
///
/// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where
- /// embedded creators do not exist in the system
+ /// the creator or an account with the creator's name does not exist within the system.
///
[Test]
- public void TestLoadIarV0_1AbsentUsers()
+ public void TestLoadIarV0_1AbsentCreator()
{
TestHelper.InMethod();
// log4net.Config.XmlConfigurator.Configure();
--
cgit v1.1