diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Inventory')
5 files changed, 142 insertions, 66 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index 01170aa..6b24718 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs | |||
@@ -78,11 +78,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
78 | private Stream m_loadStream; | 78 | private Stream m_loadStream; |
79 | 79 | ||
80 | /// <summary> | 80 | /// <summary> |
81 | /// FIXME: Do not perform this check since older versions of OpenSim do save the control file after other things | 81 | /// Has the control file been loaded for this archive? |
82 | /// (I thought they weren't). We will need to bump the version number and perform this check on all | ||
83 | /// subsequent IAR versions only | ||
84 | /// </summary> | 82 | /// </summary> |
85 | protected bool m_controlFileLoaded = true; | 83 | public bool ControlFileLoaded { get; private set; } |
84 | |||
85 | /// <summary> | ||
86 | /// Do we want to enforce the check. IAR versions before 0.2 and 1.1 do not guarantee this order, so we can't | ||
87 | /// enforce. | ||
88 | /// </summary> | ||
89 | public bool EnforceControlFileCheck { get; private set; } | ||
90 | |||
86 | protected bool m_assetsLoaded; | 91 | protected bool m_assetsLoaded; |
87 | protected bool m_inventoryNodesLoaded; | 92 | protected bool m_inventoryNodesLoaded; |
88 | 93 | ||
@@ -131,6 +136,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
131 | m_userInfo = userInfo; | 136 | m_userInfo = userInfo; |
132 | m_invPath = invPath; | 137 | m_invPath = invPath; |
133 | m_loadStream = loadStream; | 138 | m_loadStream = loadStream; |
139 | |||
140 | // FIXME: Do not perform this check since older versions of OpenSim do save the control file after other things | ||
141 | // (I thought they weren't). We will need to bump the version number and perform this check on all | ||
142 | // subsequent IAR versions only | ||
143 | ControlFileLoaded = true; | ||
134 | } | 144 | } |
135 | 145 | ||
136 | /// <summary> | 146 | /// <summary> |
@@ -471,16 +481,30 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
471 | if (m_creatorIdForAssetId.ContainsKey(assetId)) | 481 | if (m_creatorIdForAssetId.ContainsKey(assetId)) |
472 | { | 482 | { |
473 | string xmlData = Utils.BytesToString(data); | 483 | string xmlData = Utils.BytesToString(data); |
474 | SceneObjectGroup sog = SceneObjectSerializer.FromOriginalXmlFormat(xmlData); | 484 | List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); |
475 | foreach (SceneObjectPart sop in sog.Parts) | 485 | |
486 | CoalescedSceneObjects coa = null; | ||
487 | if (CoalescedSceneObjectsSerializer.TryFromXml(xmlData, out coa)) | ||
488 | { | ||
489 | // m_log.DebugFormat( | ||
490 | // "[INVENTORY ARCHIVER]: Loaded coalescence {0} has {1} objects", assetId, coa.Count); | ||
491 | |||
492 | sceneObjects.AddRange(coa.Objects); | ||
493 | } | ||
494 | else | ||
476 | { | 495 | { |
477 | if (sop.CreatorData == null || sop.CreatorData == "") | 496 | sceneObjects.Add(SceneObjectSerializer.FromOriginalXmlFormat(xmlData)); |
478 | { | ||
479 | sop.CreatorID = m_creatorIdForAssetId[assetId]; | ||
480 | } | ||
481 | } | 497 | } |
482 | 498 | ||
483 | data = Utils.StringToBytes(SceneObjectSerializer.ToOriginalXmlFormat(sog)); | 499 | foreach (SceneObjectGroup sog in sceneObjects) |
500 | foreach (SceneObjectPart sop in sog.Parts) | ||
501 | if (sop.CreatorData == null || sop.CreatorData == "") | ||
502 | sop.CreatorID = m_creatorIdForAssetId[assetId]; | ||
503 | |||
504 | if (coa != null) | ||
505 | data = Utils.StringToBytes(CoalescedSceneObjectsSerializer.ToXml(coa)); | ||
506 | else | ||
507 | data = Utils.StringToBytes(SceneObjectSerializer.ToOriginalXmlFormat(sceneObjects[0])); | ||
484 | } | 508 | } |
485 | } | 509 | } |
486 | 510 | ||
@@ -508,7 +532,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
508 | /// </summary> | 532 | /// </summary> |
509 | /// <param name="path"></param> | 533 | /// <param name="path"></param> |
510 | /// <param name="data"></param> | 534 | /// <param name="data"></param> |
511 | protected void LoadControlFile(string path, byte[] data) | 535 | public void LoadControlFile(string path, byte[] data) |
512 | { | 536 | { |
513 | XDocument doc = XDocument.Parse(Encoding.ASCII.GetString(data)); | 537 | XDocument doc = XDocument.Parse(Encoding.ASCII.GetString(data)); |
514 | XElement archiveElement = doc.Element("archive"); | 538 | XElement archiveElement = doc.Element("archive"); |
@@ -524,7 +548,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
524 | majorVersion, MAX_MAJOR_VERSION)); | 548 | majorVersion, MAX_MAJOR_VERSION)); |
525 | } | 549 | } |
526 | 550 | ||
527 | m_controlFileLoaded = true; | 551 | ControlFileLoaded = true; |
528 | m_log.InfoFormat("[INVENTORY ARCHIVER]: Loading IAR with version {0}", version); | 552 | m_log.InfoFormat("[INVENTORY ARCHIVER]: Loading IAR with version {0}", version); |
529 | } | 553 | } |
530 | 554 | ||
@@ -536,7 +560,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
536 | /// <param name="data"></param> | 560 | /// <param name="data"></param> |
537 | protected void LoadInventoryFile(string path, TarArchiveReader.TarEntryType entryType, byte[] data) | 561 | protected void LoadInventoryFile(string path, TarArchiveReader.TarEntryType entryType, byte[] data) |
538 | { | 562 | { |
539 | if (!m_controlFileLoaded) | 563 | if (!ControlFileLoaded) |
540 | throw new Exception( | 564 | throw new Exception( |
541 | string.Format( | 565 | string.Format( |
542 | "The IAR you are trying to load does not list {0} before {1}. Aborting load", | 566 | "The IAR you are trying to load does not list {0} before {1}. Aborting load", |
@@ -583,7 +607,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
583 | /// <param name="data"></param> | 607 | /// <param name="data"></param> |
584 | protected void LoadAssetFile(string path, byte[] data) | 608 | protected void LoadAssetFile(string path, byte[] data) |
585 | { | 609 | { |
586 | if (!m_controlFileLoaded) | 610 | if (!ControlFileLoaded) |
587 | throw new Exception( | 611 | throw new Exception( |
588 | string.Format( | 612 | string.Format( |
589 | "The IAR you are trying to load does not list {0} before {1}. Aborting load", | 613 | "The IAR you are trying to load does not list {0} before {1}. Aborting load", |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index dc4900f..c039b5a 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs | |||
@@ -394,12 +394,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
394 | if (options.ContainsKey("profile")) | 394 | if (options.ContainsKey("profile")) |
395 | { | 395 | { |
396 | majorVersion = 1; | 396 | majorVersion = 1; |
397 | minorVersion = 0; | 397 | minorVersion = 1; |
398 | } | 398 | } |
399 | else | 399 | else |
400 | { | 400 | { |
401 | majorVersion = 0; | 401 | majorVersion = 0; |
402 | minorVersion = 1; | 402 | minorVersion = 2; |
403 | } | 403 | } |
404 | 404 | ||
405 | m_log.InfoFormat("[INVENTORY ARCHIVER]: Creating version {0}.{1} IAR", majorVersion, minorVersion); | 405 | m_log.InfoFormat("[INVENTORY ARCHIVER]: Creating version {0}.{1} IAR", majorVersion, minorVersion); |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs index e5127a0..5ba08ee 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs | |||
@@ -68,17 +68,21 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
68 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000555"), | 68 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000555"), |
69 | FirstName = "Mr", | 69 | FirstName = "Mr", |
70 | LastName = "Tiddles" }; | 70 | LastName = "Tiddles" }; |
71 | |||
71 | protected UserAccount m_uaLL1 | 72 | protected UserAccount m_uaLL1 |
72 | = new UserAccount { | 73 | = new UserAccount { |
73 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000666"), | 74 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000666"), |
74 | FirstName = "Lord", | 75 | FirstName = "Lord", |
75 | LastName = "Lucan" }; | 76 | LastName = "Lucan" }; |
77 | |||
76 | protected UserAccount m_uaLL2 | 78 | protected UserAccount m_uaLL2 |
77 | = new UserAccount { | 79 | = new UserAccount { |
78 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000777"), | 80 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000777"), |
79 | FirstName = "Lord", | 81 | FirstName = "Lord", |
80 | LastName = "Lucan" }; | 82 | LastName = "Lucan" }; |
83 | |||
81 | protected string m_item1Name = "Ray Gun Item"; | 84 | protected string m_item1Name = "Ray Gun Item"; |
85 | protected string m_coaItemName = "Coalesced Item"; | ||
82 | 86 | ||
83 | [SetUp] | 87 | [SetUp] |
84 | public virtual void SetUp() | 88 | public virtual void SetUp() |
@@ -97,38 +101,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
97 | // log4net.Config.XmlConfigurator.Configure(); | 101 | // log4net.Config.XmlConfigurator.Configure(); |
98 | 102 | ||
99 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); | 103 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); |
100 | Scene scene = SceneSetupHelpers.SetupScene("Inventory"); | 104 | Scene scene = SceneSetupHelpers.SetupScene(); |
101 | SceneSetupHelpers.SetupSceneModules(scene, archiverModule); | 105 | SceneSetupHelpers.SetupSceneModules(scene, archiverModule); |
102 | 106 | ||
103 | UserProfileTestUtils.CreateUserWithInventory(scene, m_uaLL1, "hampshire"); | 107 | UserProfileTestUtils.CreateUserWithInventory(scene, m_uaLL1, "hampshire"); |
104 | 108 | ||
105 | MemoryStream archiveWriteStream = new MemoryStream(); | 109 | MemoryStream archiveWriteStream = new MemoryStream(); |
106 | 110 | ||
107 | // Create asset | 111 | // Create scene object asset |
108 | SceneObjectGroup object1; | 112 | UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); |
109 | SceneObjectPart part1; | 113 | SceneObjectGroup object1 = SceneSetupHelpers.CreateSceneObject(1, ownerId, "Ray Gun Object", 0x50); |
110 | { | ||
111 | string partName = "Ray Gun Object"; | ||
112 | UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); | ||
113 | PrimitiveBaseShape shape = PrimitiveBaseShape.CreateSphere(); | ||
114 | Vector3 groupPosition = new Vector3(10, 20, 30); | ||
115 | Quaternion rotationOffset = new Quaternion(20, 30, 40, 50); | ||
116 | Vector3 offsetPosition = new Vector3(5, 10, 15); | ||
117 | |||
118 | part1 | ||
119 | = new SceneObjectPart( | ||
120 | ownerId, shape, groupPosition, rotationOffset, offsetPosition); | ||
121 | part1.Name = partName; | ||
122 | |||
123 | object1 = new SceneObjectGroup(part1); | ||
124 | scene.AddNewSceneObject(object1, false); | ||
125 | } | ||
126 | 114 | ||
127 | UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); | 115 | UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); |
128 | AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1); | 116 | AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1); |
129 | scene.AssetService.Store(asset1); | 117 | scene.AssetService.Store(asset1); |
130 | 118 | ||
131 | // Create item | 119 | // Create scene object item |
132 | InventoryItemBase item1 = new InventoryItemBase(); | 120 | InventoryItemBase item1 = new InventoryItemBase(); |
133 | item1.Name = m_item1Name; | 121 | item1.Name = m_item1Name; |
134 | item1.ID = UUID.Parse("00000000-0000-0000-0000-000000000020"); | 122 | item1.ID = UUID.Parse("00000000-0000-0000-0000-000000000020"); |
@@ -139,8 +127,31 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
139 | item1.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID; | 127 | item1.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID; |
140 | scene.AddInventoryItem(item1); | 128 | scene.AddInventoryItem(item1); |
141 | 129 | ||
130 | // Create coalesced objects asset | ||
131 | SceneObjectGroup cobj1 = SceneSetupHelpers.CreateSceneObject(1, m_uaLL1.PrincipalID, "Object1", 0x120); | ||
132 | cobj1.AbsolutePosition = new Vector3(15, 30, 45); | ||
133 | |||
134 | SceneObjectGroup cobj2 = SceneSetupHelpers.CreateSceneObject(1, m_uaLL1.PrincipalID, "Object2", 0x140); | ||
135 | cobj2.AbsolutePosition = new Vector3(25, 50, 75); | ||
136 | |||
137 | CoalescedSceneObjects coa = new CoalescedSceneObjects(m_uaLL1.PrincipalID, cobj1, cobj2); | ||
138 | |||
139 | AssetBase coaAsset = AssetHelpers.CreateAsset(0x160, coa); | ||
140 | scene.AssetService.Store(coaAsset); | ||
141 | |||
142 | // Create coalesced objects inventory item | ||
143 | InventoryItemBase coaItem = new InventoryItemBase(); | ||
144 | coaItem.Name = m_coaItemName; | ||
145 | coaItem.ID = UUID.Parse("00000000-0000-0000-0000-000000000180"); | ||
146 | coaItem.AssetID = coaAsset.FullID; | ||
147 | coaItem.GroupID = UUID.Random(); | ||
148 | coaItem.CreatorIdAsUuid = m_uaLL1.PrincipalID; | ||
149 | coaItem.Owner = m_uaLL1.PrincipalID; | ||
150 | coaItem.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID; | ||
151 | scene.AddInventoryItem(coaItem); | ||
152 | |||
142 | archiverModule.ArchiveInventory( | 153 | archiverModule.ArchiveInventory( |
143 | Guid.NewGuid(), m_uaLL1.FirstName, m_uaLL1.LastName, m_item1Name, "hampshire", archiveWriteStream); | 154 | Guid.NewGuid(), m_uaLL1.FirstName, m_uaLL1.LastName, "/*", "hampshire", archiveWriteStream); |
144 | 155 | ||
145 | m_iarStreamBytes = archiveWriteStream.ToArray(); | 156 | m_iarStreamBytes = archiveWriteStream.ToArray(); |
146 | } | 157 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index 7f156f8..52232a0 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | |||
@@ -62,9 +62,66 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
62 | SerialiserModule serialiserModule = new SerialiserModule(); | 62 | SerialiserModule serialiserModule = new SerialiserModule(); |
63 | m_archiverModule = new InventoryArchiverModule(); | 63 | m_archiverModule = new InventoryArchiverModule(); |
64 | 64 | ||
65 | m_scene = SceneSetupHelpers.SetupScene("Inventory"); | 65 | m_scene = SceneSetupHelpers.SetupScene(); |
66 | SceneSetupHelpers.SetupSceneModules(m_scene, serialiserModule, m_archiverModule); | 66 | SceneSetupHelpers.SetupSceneModules(m_scene, serialiserModule, m_archiverModule); |
67 | } | 67 | } |
68 | |||
69 | [Test] | ||
70 | public void TestLoadCoalesecedItem() | ||
71 | { | ||
72 | TestHelper.InMethod(); | ||
73 | // log4net.Config.XmlConfigurator.Configure(); | ||
74 | |||
75 | UserProfileTestUtils.CreateUserWithInventory(m_scene, m_uaLL1, "password"); | ||
76 | m_archiverModule.DearchiveInventory(m_uaLL1.FirstName, m_uaLL1.LastName, "/", "password", m_iarStream); | ||
77 | |||
78 | InventoryItemBase coaItem | ||
79 | = InventoryArchiveUtils.FindItemByPath(m_scene.InventoryService, m_uaLL1.PrincipalID, m_coaItemName); | ||
80 | |||
81 | Assert.That(coaItem, Is.Not.Null, "Didn't find loaded item 1"); | ||
82 | |||
83 | string assetXml = AssetHelpers.ReadAssetAsString(m_scene.AssetService, coaItem.AssetID); | ||
84 | |||
85 | CoalescedSceneObjects coa; | ||
86 | bool readResult = CoalescedSceneObjectsSerializer.TryFromXml(assetXml, out coa); | ||
87 | |||
88 | Assert.That(readResult, Is.True); | ||
89 | Assert.That(coa.Count, Is.EqualTo(2)); | ||
90 | |||
91 | List<SceneObjectGroup> coaObjects = coa.Objects; | ||
92 | Assert.That(coaObjects[0].UUID, Is.EqualTo(UUID.Parse("00000000-0000-0000-0000-000000000120"))); | ||
93 | Assert.That(coaObjects[0].AbsolutePosition, Is.EqualTo(new Vector3(15, 30, 45))); | ||
94 | |||
95 | Assert.That(coaObjects[1].UUID, Is.EqualTo(UUID.Parse("00000000-0000-0000-0000-000000000140"))); | ||
96 | Assert.That(coaObjects[1].AbsolutePosition, Is.EqualTo(new Vector3(25, 50, 75))); | ||
97 | } | ||
98 | |||
99 | /// <summary> | ||
100 | /// Test that the IAR has the required files in the right order. | ||
101 | /// </summary> | ||
102 | /// <remarks> | ||
103 | /// At the moment, the only thing that matters is that the control file is the very first one. | ||
104 | /// </remarks> | ||
105 | [Test] | ||
106 | public void TestOrder() | ||
107 | { | ||
108 | TestHelper.InMethod(); | ||
109 | // log4net.Config.XmlConfigurator.Configure(); | ||
110 | |||
111 | MemoryStream archiveReadStream = new MemoryStream(m_iarStreamBytes); | ||
112 | TarArchiveReader tar = new TarArchiveReader(archiveReadStream); | ||
113 | string filePath; | ||
114 | TarArchiveReader.TarEntryType tarEntryType; | ||
115 | |||
116 | byte[] data = tar.ReadEntry(out filePath, out tarEntryType); | ||
117 | Assert.That(filePath, Is.EqualTo(ArchiveConstants.CONTROL_FILE_PATH)); | ||
118 | |||
119 | InventoryArchiveReadRequest iarr | ||
120 | = new InventoryArchiveReadRequest(null, null, null, (Stream)null, false); | ||
121 | iarr.LoadControlFile(filePath, data); | ||
122 | |||
123 | Assert.That(iarr.ControlFileLoaded, Is.True); | ||
124 | } | ||
68 | 125 | ||
69 | /// <summary> | 126 | /// <summary> |
70 | /// Test saving a single inventory item to a V0.1 OpenSim Inventory Archive | 127 | /// Test saving a single inventory item to a V0.1 OpenSim Inventory Archive |
@@ -84,24 +141,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
84 | UserProfileTestUtils.CreateUserWithInventory(m_scene, userFirstName, userLastName, userId, userPassword); | 141 | UserProfileTestUtils.CreateUserWithInventory(m_scene, userFirstName, userLastName, userId, userPassword); |
85 | 142 | ||
86 | // Create asset | 143 | // Create asset |
87 | SceneObjectGroup object1; | 144 | UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); |
88 | SceneObjectPart part1; | 145 | SceneObjectGroup object1 = SceneSetupHelpers.CreateSceneObject(1, ownerId, "My Little Dog Object", 0x50); |
89 | { | ||
90 | string partName = "My Little Dog Object"; | ||
91 | UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); | ||
92 | PrimitiveBaseShape shape = PrimitiveBaseShape.CreateSphere(); | ||
93 | Vector3 groupPosition = new Vector3(10, 20, 30); | ||
94 | Quaternion rotationOffset = new Quaternion(20, 30, 40, 50); | ||
95 | Vector3 offsetPosition = new Vector3(5, 10, 15); | ||
96 | |||
97 | part1 | ||
98 | = new SceneObjectPart( | ||
99 | ownerId, shape, groupPosition, rotationOffset, offsetPosition); | ||
100 | part1.Name = partName; | ||
101 | |||
102 | object1 = new SceneObjectGroup(part1); | ||
103 | m_scene.AddNewSceneObject(object1, false); | ||
104 | } | ||
105 | 146 | ||
106 | UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); | 147 | UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); |
107 | AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1); | 148 | AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1); |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/PathTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/PathTests.cs index 0e8f647..c7dae52 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/PathTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/PathTests.cs | |||
@@ -63,7 +63,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
63 | 63 | ||
64 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); | 64 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); |
65 | 65 | ||
66 | Scene scene = SceneSetupHelpers.SetupScene("Inventory"); | 66 | Scene scene = SceneSetupHelpers.SetupScene(); |
67 | SceneSetupHelpers.SetupSceneModules(scene, archiverModule); | 67 | SceneSetupHelpers.SetupSceneModules(scene, archiverModule); |
68 | 68 | ||
69 | // Create user | 69 | // Create user |
@@ -180,7 +180,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
180 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); | 180 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); |
181 | 181 | ||
182 | // Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene | 182 | // Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene |
183 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); | 183 | Scene scene = SceneSetupHelpers.SetupScene(); |
184 | 184 | ||
185 | SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); | 185 | SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); |
186 | 186 | ||
@@ -223,7 +223,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
223 | 223 | ||
224 | SerialiserModule serialiserModule = new SerialiserModule(); | 224 | SerialiserModule serialiserModule = new SerialiserModule(); |
225 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); | 225 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); |
226 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); | 226 | Scene scene = SceneSetupHelpers.SetupScene(); |
227 | SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); | 227 | SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); |
228 | 228 | ||
229 | UserProfileTestUtils.CreateUserWithInventory(scene, m_uaMT, "password"); | 229 | UserProfileTestUtils.CreateUserWithInventory(scene, m_uaMT, "password"); |
@@ -248,7 +248,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
248 | 248 | ||
249 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); | 249 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); |
250 | 250 | ||
251 | Scene scene = SceneSetupHelpers.SetupScene("Inventory"); | 251 | Scene scene = SceneSetupHelpers.SetupScene(); |
252 | SceneSetupHelpers.SetupSceneModules(scene, archiverModule); | 252 | SceneSetupHelpers.SetupSceneModules(scene, archiverModule); |
253 | 253 | ||
254 | // Create user | 254 | // Create user |
@@ -327,7 +327,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
327 | TestHelper.InMethod(); | 327 | TestHelper.InMethod(); |
328 | // log4net.Config.XmlConfigurator.Configure(); | 328 | // log4net.Config.XmlConfigurator.Configure(); |
329 | 329 | ||
330 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); | 330 | Scene scene = SceneSetupHelpers.SetupScene(); |
331 | UserAccount ua1 = UserProfileTestUtils.CreateUserWithInventory(scene); | 331 | UserAccount ua1 = UserProfileTestUtils.CreateUserWithInventory(scene); |
332 | 332 | ||
333 | Dictionary <string, InventoryFolderBase> foldersCreated = new Dictionary<string, InventoryFolderBase>(); | 333 | Dictionary <string, InventoryFolderBase> foldersCreated = new Dictionary<string, InventoryFolderBase>(); |
@@ -394,7 +394,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
394 | TestHelper.InMethod(); | 394 | TestHelper.InMethod(); |
395 | //log4net.Config.XmlConfigurator.Configure(); | 395 | //log4net.Config.XmlConfigurator.Configure(); |
396 | 396 | ||
397 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); | 397 | Scene scene = SceneSetupHelpers.SetupScene(); |
398 | UserAccount ua1 = UserProfileTestUtils.CreateUserWithInventory(scene); | 398 | UserAccount ua1 = UserProfileTestUtils.CreateUserWithInventory(scene); |
399 | 399 | ||
400 | string folder1ExistingName = "a"; | 400 | string folder1ExistingName = "a"; |
@@ -445,7 +445,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
445 | TestHelper.InMethod(); | 445 | TestHelper.InMethod(); |
446 | // log4net.Config.XmlConfigurator.Configure(); | 446 | // log4net.Config.XmlConfigurator.Configure(); |
447 | 447 | ||
448 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); | 448 | Scene scene = SceneSetupHelpers.SetupScene(); |
449 | UserAccount ua1 = UserProfileTestUtils.CreateUserWithInventory(scene); | 449 | UserAccount ua1 = UserProfileTestUtils.CreateUserWithInventory(scene); |
450 | 450 | ||
451 | string folder1ExistingName = "a"; | 451 | string folder1ExistingName = "a"; |