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.
0.7.1-dev
Justin Clark-Casey (justincc) 2011-03-10 00:19:17 +00:00
parent 549b0ea17c
commit 4dd60b7dce
2 changed files with 15 additions and 11 deletions

View File

@ -72,7 +72,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
= new UserAccount { = new UserAccount {
PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000666"), PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000666"),
FirstName = "Lord", 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"; protected string m_item1Name = "Ray Gun Item";
[SetUp] [SetUp]

View File

@ -170,10 +170,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
/// <summary> /// <summary>
/// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where /// 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.
/// </summary> /// </summary>
[Test] [Test]
public void TestLoadIarV0_1ExistingUsers() public void TestLoadIarV0_1SameNameCreator()
{ {
TestHelper.InMethod(); TestHelper.InMethod();
// log4net.Config.XmlConfigurator.Configure(); // log4net.Config.XmlConfigurator.Configure();
@ -187,7 +187,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule);
UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "meowfood"); 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); archiverModule.DearchiveInventory(m_ua1.FirstName, m_ua1.LastName, "/", "meowfood", m_iarStream);
InventoryItemBase foundItem1 InventoryItemBase foundItem1
@ -198,12 +198,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
// Assert.That( // Assert.That(
// foundItem1.CreatorId, Is.EqualTo(item1.CreatorId), // foundItem1.CreatorId, Is.EqualTo(item1.CreatorId),
// "Loaded item non-uuid creator doesn't match original"); // "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( 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"); "Loaded item uuid creator doesn't match original");
Assert.That(foundItem1.Owner, Is.EqualTo(m_ua1.PrincipalID), Assert.That(foundItem1.Owner, Is.EqualTo(m_ua1.PrincipalID),
"Loaded item owner doesn't match inventory reciever"); "Loaded item owner doesn't match inventory reciever");
@ -211,10 +210,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
/// <summary> /// <summary>
/// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where /// 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.
/// </summary> /// </summary>
[Test] [Test]
public void TestLoadIarV0_1AbsentUsers() public void TestLoadIarV0_1AbsentCreator()
{ {
TestHelper.InMethod(); TestHelper.InMethod();
// log4net.Config.XmlConfigurator.Configure(); // log4net.Config.XmlConfigurator.Configure();