add a test for updating region settings and fix a bug in uuid
translation in sqlite uncovered by this test.0.6.0-stable
parent
464c3c7091
commit
97107961e0
|
@ -258,7 +258,7 @@ namespace OpenSim.Data.SQLite
|
|||
{
|
||||
DataTable regionsettings = ds.Tables["regionsettings"];
|
||||
|
||||
DataRow settingsRow = regionsettings.Rows.Find(Util.ToRawUuidString(rs.RegionUUID));
|
||||
DataRow settingsRow = regionsettings.Rows.Find(rs.RegionUUID.ToString());
|
||||
if (settingsRow == null)
|
||||
{
|
||||
settingsRow = regionsettings.NewRow();
|
||||
|
|
|
@ -142,6 +142,26 @@ namespace OpenSim.Data.Tests
|
|||
Assert.That(r2.RegionUUID, Is.EqualTo(region2));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void T101_UpdateRegionInfo()
|
||||
{
|
||||
bool blockfly = true;
|
||||
double sunpos = 0.5;
|
||||
UUID cov = UUID.Random();
|
||||
|
||||
RegionSettings r1 = db.LoadRegionSettings(region1);
|
||||
r1.BlockFly = blockfly;
|
||||
r1.SunPosition = sunpos;
|
||||
r1.Covenant = cov;
|
||||
db.StoreRegionSettings(r1);
|
||||
|
||||
RegionSettings r2 = db.LoadRegionSettings(region1);
|
||||
Assert.That(r2.RegionUUID, Is.EqualTo(region1));
|
||||
Assert.That(r2.SunPosition, Is.EqualTo(sunpos));
|
||||
Assert.That(r2.BlockFly, Is.EqualTo(blockfly));
|
||||
Assert.That(r2.Covenant, Is.EqualTo(cov));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void T300_NoTerrain()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue