aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-02-11 22:16:07 +0000
committerJustin Clark-Casey (justincc)2013-02-11 22:16:07 +0000
commitc72c1898644319b3b0ddedc0b0a65f6b8c678db9 (patch)
tree2b266c8146f92c10b38bc2f0e3b0742bea1e6605 /OpenSim/Region/OptionalModules/Scripting
parentFix code to check for no spawn points. Possibly a merge artefact? (diff)
downloadopensim-SC-c72c1898644319b3b0ddedc0b0a65f6b8c678db9.zip
opensim-SC-c72c1898644319b3b0ddedc0b0a65f6b8c678db9.tar.gz
opensim-SC-c72c1898644319b3b0ddedc0b0a65f6b8c678db9.tar.bz2
opensim-SC-c72c1898644319b3b0ddedc0b0a65f6b8c678db9.tar.xz
Add test to try reading notecard into an invalid path in TestJsonReadNotecard() regression test
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs20
1 files changed, 13 insertions, 7 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs
index af97ac7..e91c02d 100644
--- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs
@@ -357,8 +357,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
357 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}"); 357 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}");
358 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make", notecardName); 358 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make", notecardName);
359 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); 359 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero));
360 360
361 // These don't behave as I expect yet - reading to a path still seems to place the notecard contents at the root.
362 string value = (string)InvokeOp("JsonGetValue", receivingStoreId, "Hello"); 361 string value = (string)InvokeOp("JsonGetValue", receivingStoreId, "Hello");
363 Assert.That(value, Is.EqualTo("")); 362 Assert.That(value, Is.EqualTo(""));
364 363
@@ -367,27 +366,24 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
367 } 366 }
368 367
369 { 368 {
370 // Read notecard to new multi-component path 369 // Read notecard to new multi-component path. This should not work.
371 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}"); 370 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}");
372 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make.it", notecardName); 371 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make.it", notecardName);
373 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); 372 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero));
374 373
375 // These don't behave as I expect yet - reading to a path still seems to place the notecard contents at the root.
376 string value = (string)InvokeOp("JsonGetValue", receivingStoreId, "Hello"); 374 string value = (string)InvokeOp("JsonGetValue", receivingStoreId, "Hello");
377 Assert.That(value, Is.EqualTo("")); 375 Assert.That(value, Is.EqualTo(""));
378 376
379 // TODO: Check that we are not expecting reading to a new path to work.
380 value = (string)InvokeOp("JsonGetValue", receivingStoreId, "make.it.Hello"); 377 value = (string)InvokeOp("JsonGetValue", receivingStoreId, "make.it.Hello");
381 Assert.That(value, Is.EqualTo("")); 378 Assert.That(value, Is.EqualTo(""));
382 } 379 }
383 380
384 { 381 {
385 // Read notecard to existing multi-component path 382 // Read notecard to existing multi-component path. This should work
386 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'make' : { 'it' : 'so' } }"); 383 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'make' : { 'it' : 'so' } }");
387 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make.it", notecardName); 384 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make.it", notecardName);
388 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); 385 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero));
389 386
390 // These don't behave as I expect yet - reading to a path still seems to place the notecard contents at the root.
391 string value = (string)InvokeOp("JsonGetValue", receivingStoreId, "Hello"); 387 string value = (string)InvokeOp("JsonGetValue", receivingStoreId, "Hello");
392 Assert.That(value, Is.EqualTo("")); 388 Assert.That(value, Is.EqualTo(""));
393 389
@@ -396,6 +392,16 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
396 } 392 }
397 393
398 { 394 {
395 // Read notecard to invalid path. This should not work.
396 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'make' : { 'it' : 'so' } }");
397 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "/", notecardName);
398 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero));
399
400 string value = (string)InvokeOp("JsonGetValue", receivingStoreId, "Hello");
401 Assert.That(value, Is.EqualTo(""));
402 }
403
404 {
399 // Try read notecard to fake store. 405 // Try read notecard to fake store.
400 UUID fakeStoreId = TestHelpers.ParseTail(0x500); 406 UUID fakeStoreId = TestHelpers.ParseTail(0x500);
401 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, fakeStoreId, "", notecardName); 407 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, fakeStoreId, "", notecardName);