aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorSean Dague2008-09-29 21:55:59 +0000
committerSean Dague2008-09-29 21:55:59 +0000
commit97107961e0c92fc26ae70fc8d01b79014c894f38 (patch)
treec7ee527a42b0c267f2815b7feac21511f7ed49b5 /OpenSim
parent* Add missing mssql migration files from http://opensimulator.org/mantis/view... (diff)
downloadopensim-SC-97107961e0c92fc26ae70fc8d01b79014c894f38.zip
opensim-SC-97107961e0c92fc26ae70fc8d01b79014c894f38.tar.gz
opensim-SC-97107961e0c92fc26ae70fc8d01b79014c894f38.tar.bz2
opensim-SC-97107961e0c92fc26ae70fc8d01b79014c894f38.tar.xz
add a test for updating region settings and fix a bug in uuid
translation in sqlite uncovered by this test.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/SQLite/SQLiteRegionData.cs2
-rw-r--r--OpenSim/Data/Tests/BasicRegionTest.cs20
2 files changed, 21 insertions, 1 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs
index 157a4b8..74715c0 100644
--- a/OpenSim/Data/SQLite/SQLiteRegionData.cs
+++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs
@@ -258,7 +258,7 @@ namespace OpenSim.Data.SQLite
258 { 258 {
259 DataTable regionsettings = ds.Tables["regionsettings"]; 259 DataTable regionsettings = ds.Tables["regionsettings"];
260 260
261 DataRow settingsRow = regionsettings.Rows.Find(Util.ToRawUuidString(rs.RegionUUID)); 261 DataRow settingsRow = regionsettings.Rows.Find(rs.RegionUUID.ToString());
262 if (settingsRow == null) 262 if (settingsRow == null)
263 { 263 {
264 settingsRow = regionsettings.NewRow(); 264 settingsRow = regionsettings.NewRow();
diff --git a/OpenSim/Data/Tests/BasicRegionTest.cs b/OpenSim/Data/Tests/BasicRegionTest.cs
index f9c5565..9c3b651 100644
--- a/OpenSim/Data/Tests/BasicRegionTest.cs
+++ b/OpenSim/Data/Tests/BasicRegionTest.cs
@@ -143,6 +143,26 @@ namespace OpenSim.Data.Tests
143 } 143 }
144 144
145 [Test] 145 [Test]
146 public void T101_UpdateRegionInfo()
147 {
148 bool blockfly = true;
149 double sunpos = 0.5;
150 UUID cov = UUID.Random();
151
152 RegionSettings r1 = db.LoadRegionSettings(region1);
153 r1.BlockFly = blockfly;
154 r1.SunPosition = sunpos;
155 r1.Covenant = cov;
156 db.StoreRegionSettings(r1);
157
158 RegionSettings r2 = db.LoadRegionSettings(region1);
159 Assert.That(r2.RegionUUID, Is.EqualTo(region1));
160 Assert.That(r2.SunPosition, Is.EqualTo(sunpos));
161 Assert.That(r2.BlockFly, Is.EqualTo(blockfly));
162 Assert.That(r2.Covenant, Is.EqualTo(cov));
163 }
164
165 [Test]
146 public void T300_NoTerrain() 166 public void T300_NoTerrain()
147 { 167 {
148 db.LoadTerrain(region1); 168 db.LoadTerrain(region1);