diff options
author | Justin Clark-Casey (justincc) | 2015-01-08 20:36:03 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2015-01-08 20:36:03 +0000 |
commit | 801a86ca035b5c8bbd1f99082fd80f2471d6345c (patch) | |
tree | e8c4394969cb081a0292c96a77d8374ca4f4af84 /OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs | |
parent | Make the IteratingUuidGatherer the only UuidGatherer. (diff) | |
download | opensim-SC_OLD-801a86ca035b5c8bbd1f99082fd80f2471d6345c.zip opensim-SC_OLD-801a86ca035b5c8bbd1f99082fd80f2471d6345c.tar.gz opensim-SC_OLD-801a86ca035b5c8bbd1f99082fd80f2471d6345c.tar.bz2 opensim-SC_OLD-801a86ca035b5c8bbd1f99082fd80f2471d6345c.tar.xz |
When inspecting a script or notecard, also try to look up any assets embedded therein.
This is primarily to fix an issue where inventory items for NPC attachments would not be saved in archives as the assets referenced in the appearance notecard were not checked in this manner.
Relates to http://opensimulator.org/mantis/view.php?id=7376
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs b/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs index 1fe0e79..4ae27d7 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs | |||
@@ -88,11 +88,12 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
88 | public void TestNotecardAsset() | 88 | public void TestNotecardAsset() |
89 | { | 89 | { |
90 | TestHelpers.InMethod(); | 90 | TestHelpers.InMethod(); |
91 | TestHelpers.EnableLogging(); | 91 | // TestHelpers.EnableLogging(); |
92 | 92 | ||
93 | UUID ownerId = TestHelpers.ParseTail(0x10); | 93 | UUID ownerId = TestHelpers.ParseTail(0x10); |
94 | UUID embeddedId = TestHelpers.ParseTail(0x20); | 94 | UUID embeddedId = TestHelpers.ParseTail(0x20); |
95 | UUID missingEmbeddedId = TestHelpers.ParseTail(0x21); | 95 | UUID secondLevelEmbeddedId = TestHelpers.ParseTail(0x21); |
96 | UUID missingEmbeddedId = TestHelpers.ParseTail(0x22); | ||
96 | UUID ncAssetId = TestHelpers.ParseTail(0x30); | 97 | UUID ncAssetId = TestHelpers.ParseTail(0x30); |
97 | 98 | ||
98 | AssetBase ncAsset | 99 | AssetBase ncAsset |
@@ -100,9 +101,14 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
100 | ncAssetId, string.Format("Hello{0}World{1}", embeddedId, missingEmbeddedId)); | 101 | ncAssetId, string.Format("Hello{0}World{1}", embeddedId, missingEmbeddedId)); |
101 | m_assetService.Store(ncAsset); | 102 | m_assetService.Store(ncAsset); |
102 | 103 | ||
103 | AssetBase embeddedAsset = AssetHelpers.CreateNotecardAsset(embeddedId, "We'll meet again."); | 104 | AssetBase embeddedAsset |
105 | = AssetHelpers.CreateNotecardAsset(embeddedId, string.Format("{0} We'll meet again.", secondLevelEmbeddedId)); | ||
104 | m_assetService.Store(embeddedAsset); | 106 | m_assetService.Store(embeddedAsset); |
105 | 107 | ||
108 | AssetBase secondLevelEmbeddedAsset | ||
109 | = AssetHelpers.CreateNotecardAsset(secondLevelEmbeddedId, "Don't know where, don't know when."); | ||
110 | m_assetService.Store(secondLevelEmbeddedAsset); | ||
111 | |||
106 | m_uuidGatherer.AddForInspection(ncAssetId); | 112 | m_uuidGatherer.AddForInspection(ncAssetId); |
107 | m_uuidGatherer.GatherAll(); | 113 | m_uuidGatherer.GatherAll(); |
108 | 114 | ||
@@ -112,7 +118,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
112 | Assert.That(m_uuidGatherer.GatheredUuids.Count, Is.EqualTo(3)); | 118 | Assert.That(m_uuidGatherer.GatheredUuids.Count, Is.EqualTo(3)); |
113 | Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(ncAssetId)); | 119 | Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(ncAssetId)); |
114 | Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(embeddedId)); | 120 | Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(embeddedId)); |
115 | Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(missingEmbeddedId)); | 121 | Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(secondLevelEmbeddedId)); |
116 | } | 122 | } |
117 | } | 123 | } |
118 | } \ No newline at end of file | 124 | } \ No newline at end of file |