Add test for simple case where creator account with appropriate uuid exists on the target system for an iar load
parent
8d69e68311
commit
ad1dea5aff
|
@ -178,6 +178,38 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||||
// TODO: Test presence of more files and contents of files.
|
// TODO: Test presence of more files and contents of files.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test case where a creator account exists for the creator UUID embedded in item metadata and serialized
|
||||||
|
/// objects.
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void TestLoadIarCreatorAccountPresent()
|
||||||
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
// log4net.Config.XmlConfigurator.Configure();
|
||||||
|
|
||||||
|
UserProfileTestUtils.CreateUserWithInventory(m_scene, m_uaLL1, "meowfood");
|
||||||
|
|
||||||
|
m_archiverModule.DearchiveInventory(m_uaLL1.FirstName, m_uaLL1.LastName, "/", "meowfood", m_iarStream);
|
||||||
|
InventoryItemBase foundItem1
|
||||||
|
= InventoryArchiveUtils.FindItemByPath(m_scene.InventoryService, m_uaLL1.PrincipalID, m_item1Name);
|
||||||
|
|
||||||
|
Assert.That(
|
||||||
|
foundItem1.CreatorId, Is.EqualTo(m_uaLL1.PrincipalID.ToString()),
|
||||||
|
"Loaded item non-uuid creator doesn't match original");
|
||||||
|
Assert.That(
|
||||||
|
foundItem1.CreatorIdAsUuid, Is.EqualTo(m_uaLL1.PrincipalID),
|
||||||
|
"Loaded item uuid creator doesn't match original");
|
||||||
|
Assert.That(foundItem1.Owner, Is.EqualTo(m_uaLL1.PrincipalID),
|
||||||
|
"Loaded item owner doesn't match inventory reciever");
|
||||||
|
|
||||||
|
AssetBase asset1 = m_scene.AssetService.Get(foundItem1.AssetID.ToString());
|
||||||
|
string xmlData = Utils.BytesToString(asset1.Data);
|
||||||
|
SceneObjectGroup sog1 = SceneObjectSerializer.FromOriginalXmlFormat(xmlData);
|
||||||
|
|
||||||
|
Assert.That(sog1.RootPart.CreatorID, Is.EqualTo(m_uaLL1.PrincipalID));
|
||||||
|
}
|
||||||
|
|
||||||
/// <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 same name as the creator, though not the same id.
|
/// an account exists with the same name as the creator, though not the same id.
|
||||||
|
|
Loading…
Reference in New Issue