diff options
author | Diva Canto | 2015-06-23 14:24:55 -0700 |
---|---|---|
committer | Diva Canto | 2015-06-23 14:24:55 -0700 |
commit | b5ac0e1ab811626ef5e904d6f67689dbd33433bc (patch) | |
tree | a251bbfa94d8e3b90d314fcbcb79f3ccd971ee17 /OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventoryDescendents2HandlerTests.cs | |
parent | Fix my typo, the dll is named OpenSim, not Opensim (diff) | |
download | opensim-SC_OLD-b5ac0e1ab811626ef5e904d6f67689dbd33433bc.zip opensim-SC_OLD-b5ac0e1ab811626ef5e904d6f67689dbd33433bc.tar.gz opensim-SC_OLD-b5ac0e1ab811626ef5e904d6f67689dbd33433bc.tar.bz2 opensim-SC_OLD-b5ac0e1ab811626ef5e904d6f67689dbd33433bc.tar.xz |
FetchInventoryDescendents2: Signal to the viewer that folder with UUID.Zero is a bad folder. Don't even go to the backend to ask for it, because that will likely kill the sim. Apparently Firestorm requests folder Zero quite often.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventoryDescendents2HandlerTests.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventoryDescendents2HandlerTests.cs b/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventoryDescendents2HandlerTests.cs index 380c54a..0b66835 100644 --- a/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventoryDescendents2HandlerTests.cs +++ b/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventoryDescendents2HandlerTests.cs | |||
@@ -262,6 +262,31 @@ namespace OpenSim.Capabilities.Handlers.FetchInventory.Tests | |||
262 | count = Regex.Matches(llsdresponse, notecards_folder).Count; | 262 | count = Regex.Matches(llsdresponse, notecards_folder).Count; |
263 | Assert.AreEqual(2, count, "More than 1 notecards folder in response"); // Notecards will also be under root, so 2 | 263 | Assert.AreEqual(2, count, "More than 1 notecards folder in response"); // Notecards will also be under root, so 2 |
264 | } | 264 | } |
265 | |||
266 | [Test] | ||
267 | public void Test_005_FolderZero() | ||
268 | { | ||
269 | TestHelpers.InMethod(); | ||
270 | |||
271 | Init(); | ||
272 | |||
273 | FetchInvDescHandler handler = new FetchInvDescHandler(m_scene.InventoryService, null, m_scene); | ||
274 | TestOSHttpRequest req = new TestOSHttpRequest(); | ||
275 | TestOSHttpResponse resp = new TestOSHttpResponse(); | ||
276 | |||
277 | string request = "<llsd><map><key>folders</key><array><map><key>fetch_folders</key><integer>1</integer><key>fetch_items</key><boolean>1</boolean><key>folder_id</key><uuid>"; | ||
278 | request += UUID.Zero; | ||
279 | request += "</uuid><key>owner_id</key><uuid>00000000-0000-0000-0000-000000000000</uuid><key>sort_order</key><integer>1</integer></map></array></map></llsd>"; | ||
280 | |||
281 | string llsdresponse = handler.FetchInventoryDescendentsRequest(request, "/FETCH", string.Empty, req, resp); | ||
282 | |||
283 | Assert.That(llsdresponse != null, Is.True, "Incorrect null response"); | ||
284 | Assert.That(llsdresponse != string.Empty, Is.True, "Incorrect empty response"); | ||
285 | Assert.That(llsdresponse.Contains("bad_folders</key><array><uuid>00000000-0000-0000-0000-000000000000"), Is.True, "Folder Zero should be a bad folder"); | ||
286 | |||
287 | Console.WriteLine(llsdresponse); | ||
288 | } | ||
289 | |||
265 | } | 290 | } |
266 | 291 | ||
267 | } \ No newline at end of file | 292 | } \ No newline at end of file |