diff options
author | Justin Clark-Casey (justincc) | 2009-09-08 16:12:15 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2009-09-08 16:12:15 +0100 |
commit | 76b21860e9f727391849c9b38c620b9bc16e4312 (patch) | |
tree | 8191cb1f4ec2a7359d35b1d3b8eeeb52bcfb4907 /OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests | |
parent | Only allow iar load/save if user is logged in to the region simulator (diff) | |
download | opensim-SC_OLD-76b21860e9f727391849c9b38c620b9bc16e4312.zip opensim-SC_OLD-76b21860e9f727391849c9b38c620b9bc16e4312.tar.gz opensim-SC_OLD-76b21860e9f727391849c9b38c620b9bc16e4312.tar.bz2 opensim-SC_OLD-76b21860e9f727391849c9b38c620b9bc16e4312.tar.xz |
refactor iar name generation
slightly change the format of item archive names
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index d579a81..5461ea2 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | |||
@@ -153,19 +153,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
153 | //bool gotControlFile = false; | 153 | //bool gotControlFile = false; |
154 | bool gotObject1File = false; | 154 | bool gotObject1File = false; |
155 | //bool gotObject2File = false; | 155 | //bool gotObject2File = false; |
156 | string expectedObject1FileName = InventoryArchiveWriteRequest.CreateArchiveItemName(item1); | ||
156 | string expectedObject1FilePath = string.Format( | 157 | string expectedObject1FilePath = string.Format( |
157 | "{0}{1}/{2}_{3}.xml", | 158 | "{0}{1}{2}", |
158 | ArchiveConstants.INVENTORY_PATH, | 159 | ArchiveConstants.INVENTORY_PATH, |
159 | string.Format( | 160 | InventoryArchiveWriteRequest.CreateArchiveFolderName(objsFolder), |
160 | "Objects{0}{1}", ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR, objsFolder.ID), | 161 | expectedObject1FileName); |
161 | item1.Name, | ||
162 | item1Id); | ||
163 | |||
164 | // string expectedObject2FileName = string.Format( | ||
165 | // "{0}_{1:000}-{2:000}-{3:000}__{4}.xml", | ||
166 | // part2.Name, | ||
167 | // Math.Round(part2.GroupPosition.X), Math.Round(part2.GroupPosition.Y), Math.Round(part2.GroupPosition.Z), | ||
168 | // part2.UUID); | ||
169 | 162 | ||
170 | string filePath; | 163 | string filePath; |
171 | TarArchiveReader.TarEntryType tarEntryType; | 164 | TarArchiveReader.TarEntryType tarEntryType; |
@@ -187,7 +180,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
187 | // | 180 | // |
188 | // if (fileName.StartsWith(part1.Name)) | 181 | // if (fileName.StartsWith(part1.Name)) |
189 | // { | 182 | // { |
190 | Assert.That(filePath, Is.EqualTo(expectedObject1FilePath)); | 183 | Assert.That(expectedObject1FilePath, Is.EqualTo(filePath)); |
191 | gotObject1File = true; | 184 | gotObject1File = true; |
192 | // } | 185 | // } |
193 | // else if (fileName.StartsWith(part2.Name)) | 186 | // else if (fileName.StartsWith(part2.Name)) |
@@ -385,16 +378,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
385 | string folder2Name = "b"; | 378 | string folder2Name = "b"; |
386 | string itemName = "c.lsl"; | 379 | string itemName = "c.lsl"; |
387 | 380 | ||
388 | string folder1ArchiveName | 381 | string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1Name, UUID.Random()); |
389 | = string.Format( | 382 | string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random()); |
390 | "{0}{1}{2}", folder1Name, ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR, UUID.Random()); | 383 | string itemArchiveName = InventoryArchiveWriteRequest.CreateArchiveItemName(itemName, UUID.Random()); |
391 | string folder2ArchiveName | 384 | |
392 | = string.Format( | ||
393 | "{0}{1}{2}", folder2Name, ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR, UUID.Random()); | ||
394 | string itemArchivePath | 385 | string itemArchivePath |
395 | = string.Format( | 386 | = string.Format( |
396 | "{0}{1}/{2}/{3}", | 387 | "{0}{1}{2}{3}", |
397 | ArchiveConstants.INVENTORY_PATH, folder1ArchiveName, folder2ArchiveName, itemName); | 388 | ArchiveConstants.INVENTORY_PATH, folder1ArchiveName, folder2ArchiveName, itemArchiveName); |
398 | 389 | ||
399 | //Console.WriteLine("userInfo.RootFolder 2: {0}", userInfo.RootFolder); | 390 | //Console.WriteLine("userInfo.RootFolder 2: {0}", userInfo.RootFolder); |
400 | 391 | ||