diff options
author | Justin Clark-Casey (justincc) | 2011-03-10 00:19:17 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-03-10 00:19:17 +0000 |
commit | 4dd60b7dce4421bec89e9964a3fb51a1658945ad (patch) | |
tree | 8a5e43e3248206cd47c4b1a745a05e08213f4ad4 /OpenSim/Region/CoreModules | |
parent | Split the inventory path testing parts of TestLoadIarV0_1ExistingUsers() into... (diff) | |
download | opensim-SC-4dd60b7dce4421bec89e9964a3fb51a1658945ad.zip opensim-SC-4dd60b7dce4421bec89e9964a3fb51a1658945ad.tar.gz opensim-SC-4dd60b7dce4421bec89e9964a3fb51a1658945ad.tar.bz2 opensim-SC-4dd60b7dce4421bec89e9964a3fb51a1658945ad.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | 19 |
2 files changed, 15 insertions, 11 deletions
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 | |||
72 | = new UserAccount { | 72 | = new UserAccount { |
73 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000666"), | 73 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000666"), |
74 | FirstName = "Lord", | 74 | FirstName = "Lord", |
75 | LastName = "Lucan" }; | 75 | LastName = "Lucan" }; |
76 | protected UserAccount m_ua3 | ||
77 | = new UserAccount { | ||
78 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000777"), | ||
79 | FirstName = "Lord", | ||
80 | LastName = "Lucan" }; | ||
76 | protected string m_item1Name = "Ray Gun Item"; | 81 | protected string m_item1Name = "Ray Gun Item"; |
77 | 82 | ||
78 | [SetUp] | 83 | [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 | |||
170 | 170 | ||
171 | /// <summary> | 171 | /// <summary> |
172 | /// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where | 172 | /// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where |
173 | /// an account exists with the creator name. | 173 | /// an account exists with the same name as the creator, though not the same id. |
174 | /// </summary> | 174 | /// </summary> |
175 | [Test] | 175 | [Test] |
176 | public void TestLoadIarV0_1ExistingUsers() | 176 | public void TestLoadIarV0_1SameNameCreator() |
177 | { | 177 | { |
178 | TestHelper.InMethod(); | 178 | TestHelper.InMethod(); |
179 | // log4net.Config.XmlConfigurator.Configure(); | 179 | // log4net.Config.XmlConfigurator.Configure(); |
@@ -187,7 +187,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
187 | SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); | 187 | SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); |
188 | 188 | ||
189 | UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "meowfood"); | 189 | UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "meowfood"); |
190 | UserProfileTestUtils.CreateUserWithInventory(scene, m_ua2, "hampshire"); | 190 | UserProfileTestUtils.CreateUserWithInventory(scene, m_ua3, "hampshire"); |
191 | 191 | ||
192 | archiverModule.DearchiveInventory(m_ua1.FirstName, m_ua1.LastName, "/", "meowfood", m_iarStream); | 192 | archiverModule.DearchiveInventory(m_ua1.FirstName, m_ua1.LastName, "/", "meowfood", m_iarStream); |
193 | InventoryItemBase foundItem1 | 193 | InventoryItemBase foundItem1 |
@@ -198,12 +198,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
198 | // Assert.That( | 198 | // Assert.That( |
199 | // foundItem1.CreatorId, Is.EqualTo(item1.CreatorId), | 199 | // foundItem1.CreatorId, Is.EqualTo(item1.CreatorId), |
200 | // "Loaded item non-uuid creator doesn't match original"); | 200 | // "Loaded item non-uuid creator doesn't match original"); |
201 | // Assert.That( | ||
202 | // foundItem1.CreatorId, Is.EqualTo(m_ua2.PrincipalID.ToString()), | ||
203 | // "Loaded item non-uuid creator doesn't match original"); | ||
204 | |||
205 | Assert.That( | 201 | Assert.That( |
206 | foundItem1.CreatorIdAsUuid, Is.EqualTo(m_ua2.PrincipalID), | 202 | foundItem1.CreatorId, Is.EqualTo(m_ua3.PrincipalID.ToString()), |
203 | "Loaded item non-uuid creator doesn't match original"); | ||
204 | Assert.That( | ||
205 | foundItem1.CreatorIdAsUuid, Is.EqualTo(m_ua3.PrincipalID), | ||
207 | "Loaded item uuid creator doesn't match original"); | 206 | "Loaded item uuid creator doesn't match original"); |
208 | Assert.That(foundItem1.Owner, Is.EqualTo(m_ua1.PrincipalID), | 207 | Assert.That(foundItem1.Owner, Is.EqualTo(m_ua1.PrincipalID), |
209 | "Loaded item owner doesn't match inventory reciever"); | 208 | "Loaded item owner doesn't match inventory reciever"); |
@@ -211,10 +210,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
211 | 210 | ||
212 | /// <summary> | 211 | /// <summary> |
213 | /// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where | 212 | /// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where |
214 | /// embedded creators do not exist in the system | 213 | /// the creator or an account with the creator's name does not exist within the system. |
215 | /// </summary> | 214 | /// </summary> |
216 | [Test] | 215 | [Test] |
217 | public void TestLoadIarV0_1AbsentUsers() | 216 | public void TestLoadIarV0_1AbsentCreator() |
218 | { | 217 | { |
219 | TestHelper.InMethod(); | 218 | TestHelper.InMethod(); |
220 | // log4net.Config.XmlConfigurator.Configure(); | 219 | // log4net.Config.XmlConfigurator.Configure(); |