diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index dd524f5..cd14340 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | |||
@@ -66,7 +66,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
66 | /// <summary> | 66 | /// <summary> |
67 | /// Test saving a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet). | 67 | /// Test saving a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet). |
68 | /// </summary> | 68 | /// </summary> |
69 | //[Test] | 69 | [Test] |
70 | public void TestSaveIarV0_1() | 70 | public void TestSaveIarV0_1() |
71 | { | 71 | { |
72 | TestHelper.InMethod(); | 72 | TestHelper.InMethod(); |
@@ -264,17 +264,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
264 | } | 264 | } |
265 | Assert.That(userInfo.HasReceivedInventory, Is.True, "FetchInventory timed out (10 seconds)"); | 265 | Assert.That(userInfo.HasReceivedInventory, Is.True, "FetchInventory timed out (10 seconds)"); |
266 | InventoryItemBase foundItem = userInfo.RootFolder.FindItemByPath(itemName); | 266 | InventoryItemBase foundItem = userInfo.RootFolder.FindItemByPath(itemName); |
267 | Assert.That(foundItem, Is.Not.Null); | 267 | Assert.That(foundItem, Is.Not.Null, "Didn't find loaded item"); |
268 | Assert.That(foundItem.CreatorId, Is.EqualTo(item1.CreatorId)); | 268 | Assert.That( |
269 | Assert.That(foundItem.CreatorIdAsUuid, Is.EqualTo(user2Uuid)); | 269 | foundItem.CreatorId, Is.EqualTo(item1.CreatorId), |
270 | Assert.That(foundItem.Owner, Is.EqualTo(userUuid)); | 270 | "Loaded item non-uuid creator doesn't match original"); |
271 | Assert.That( | ||
272 | foundItem.CreatorIdAsUuid, Is.EqualTo(user2Uuid), | ||
273 | "Loaded item uuid creator doesn't match original"); | ||
274 | Assert.That(foundItem.Owner, Is.EqualTo(userUuid), | ||
275 | "Loaded item owner doesn't match inventory reciever"); | ||
271 | 276 | ||
272 | Console.WriteLine("Successfully completed {0}", MethodBase.GetCurrentMethod()); | 277 | Console.WriteLine("Successfully completed {0}", MethodBase.GetCurrentMethod()); |
273 | } | 278 | } |
274 | 279 | ||
275 | /// <summary> | 280 | /// <summary> |
276 | /// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where | 281 | /// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where |
277 | /// no account exists with the creator name | 282 | /// no account exists with the creator name |
278 | /// </summary> | 283 | /// </summary> |
279 | //[Test] | 284 | //[Test] |
280 | public void TestLoadIarV0_1TempProfiles() | 285 | public void TestLoadIarV0_1TempProfiles() |
@@ -353,7 +358,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
353 | /// <summary> | 358 | /// <summary> |
354 | /// Test replication of an archive path to the user's inventory. | 359 | /// Test replication of an archive path to the user's inventory. |
355 | /// </summary> | 360 | /// </summary> |
356 | //[Test] | 361 | [Test] |
357 | public void TestReplicateArchivePathToUserInventory() | 362 | public void TestReplicateArchivePathToUserInventory() |
358 | { | 363 | { |
359 | TestHelper.InMethod(); | 364 | TestHelper.InMethod(); |
@@ -362,6 +367,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
362 | 367 | ||
363 | CachedUserInfo userInfo = UserProfileTestUtils.CreateUserWithInventory(commsManager); | 368 | CachedUserInfo userInfo = UserProfileTestUtils.CreateUserWithInventory(commsManager); |
364 | userInfo.FetchInventory(); | 369 | userInfo.FetchInventory(); |
370 | /* | ||
365 | for (int i = 0 ; i < 50 ; i++) | 371 | for (int i = 0 ; i < 50 ; i++) |
366 | { | 372 | { |
367 | if (userInfo.HasReceivedInventory == true) | 373 | if (userInfo.HasReceivedInventory == true) |
@@ -369,6 +375,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
369 | Thread.Sleep(200); | 375 | Thread.Sleep(200); |
370 | } | 376 | } |
371 | Assert.That(userInfo.HasReceivedInventory, Is.True, "FetchInventory timed out (10 seconds)"); | 377 | Assert.That(userInfo.HasReceivedInventory, Is.True, "FetchInventory timed out (10 seconds)"); |
378 | */ | ||
379 | |||
380 | Console.WriteLine("userInfo.RootFolder 1: {0}", userInfo.RootFolder); | ||
381 | |||
372 | Dictionary <string, InventoryFolderImpl> foldersCreated = new Dictionary<string, InventoryFolderImpl>(); | 382 | Dictionary <string, InventoryFolderImpl> foldersCreated = new Dictionary<string, InventoryFolderImpl>(); |
373 | List<InventoryNodeBase> nodesLoaded = new List<InventoryNodeBase>(); | 383 | List<InventoryNodeBase> nodesLoaded = new List<InventoryNodeBase>(); |
374 | 384 | ||
@@ -386,10 +396,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
386 | = string.Format( | 396 | = string.Format( |
387 | "{0}{1}/{2}/{3}", | 397 | "{0}{1}/{2}/{3}", |
388 | ArchiveConstants.INVENTORY_PATH, folder1ArchiveName, folder2ArchiveName, itemName); | 398 | ArchiveConstants.INVENTORY_PATH, folder1ArchiveName, folder2ArchiveName, itemName); |
399 | |||
400 | Console.WriteLine("userInfo.RootFolder 2: {0}", userInfo.RootFolder); | ||
389 | 401 | ||
390 | new InventoryArchiveReadRequest(userInfo, null, (Stream)null, null, null) | 402 | new InventoryArchiveReadRequest(userInfo, null, (Stream)null, null, null) |
391 | .ReplicateArchivePathToUserInventory(itemArchivePath, false, userInfo.RootFolder, foldersCreated, nodesLoaded); | 403 | .ReplicateArchivePathToUserInventory(itemArchivePath, false, userInfo.RootFolder, foldersCreated, nodesLoaded); |
392 | 404 | ||
405 | Console.WriteLine("userInfo.RootFolder 3: {0}", userInfo.RootFolder); | ||
393 | InventoryFolderImpl folder1 = userInfo.RootFolder.FindFolderByPath("a"); | 406 | InventoryFolderImpl folder1 = userInfo.RootFolder.FindFolderByPath("a"); |
394 | Assert.That(folder1, Is.Not.Null, "Could not find folder a"); | 407 | Assert.That(folder1, Is.Not.Null, "Could not find folder a"); |
395 | InventoryFolderImpl folder2 = folder1.FindFolderByPath("b"); | 408 | InventoryFolderImpl folder2 = folder1.FindFolderByPath("b"); |