Add test to try reading notecard into an invalid path in TestJsonReadNotecard() regression test
parent
6f3dcf58b8
commit
c72c189864
|
@ -358,7 +358,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
|
|||
UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make", notecardName);
|
||||
Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero));
|
||||
|
||||
// These don't behave as I expect yet - reading to a path still seems to place the notecard contents at the root.
|
||||
string value = (string)InvokeOp("JsonGetValue", receivingStoreId, "Hello");
|
||||
Assert.That(value, Is.EqualTo(""));
|
||||
|
||||
|
@ -367,27 +366,24 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
|
|||
}
|
||||
|
||||
{
|
||||
// Read notecard to new multi-component path
|
||||
// Read notecard to new multi-component path. This should not work.
|
||||
UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}");
|
||||
UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make.it", notecardName);
|
||||
Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero));
|
||||
|
||||
// These don't behave as I expect yet - reading to a path still seems to place the notecard contents at the root.
|
||||
string value = (string)InvokeOp("JsonGetValue", receivingStoreId, "Hello");
|
||||
Assert.That(value, Is.EqualTo(""));
|
||||
|
||||
// TODO: Check that we are not expecting reading to a new path to work.
|
||||
value = (string)InvokeOp("JsonGetValue", receivingStoreId, "make.it.Hello");
|
||||
Assert.That(value, Is.EqualTo(""));
|
||||
}
|
||||
|
||||
{
|
||||
// Read notecard to existing multi-component path
|
||||
// Read notecard to existing multi-component path. This should work
|
||||
UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'make' : { 'it' : 'so' } }");
|
||||
UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make.it", notecardName);
|
||||
Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero));
|
||||
|
||||
// These don't behave as I expect yet - reading to a path still seems to place the notecard contents at the root.
|
||||
string value = (string)InvokeOp("JsonGetValue", receivingStoreId, "Hello");
|
||||
Assert.That(value, Is.EqualTo(""));
|
||||
|
||||
|
@ -395,6 +391,16 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
|
|||
Assert.That(value, Is.EqualTo("World"));
|
||||
}
|
||||
|
||||
{
|
||||
// Read notecard to invalid path. This should not work.
|
||||
UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'make' : { 'it' : 'so' } }");
|
||||
UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "/", notecardName);
|
||||
Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero));
|
||||
|
||||
string value = (string)InvokeOp("JsonGetValue", receivingStoreId, "Hello");
|
||||
Assert.That(value, Is.EqualTo(""));
|
||||
}
|
||||
|
||||
{
|
||||
// Try read notecard to fake store.
|
||||
UUID fakeStoreId = TestHelpers.ParseTail(0x500);
|
||||
|
|
Loading…
Reference in New Issue