From 2d7c15c5606a3349eb38c60866ff48b8c01827a0 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 18 Feb 2009 18:48:59 +0000 Subject: Fix estate ban list persistence in MySQL and reenable tests --- OpenSim/Data/MySQL/MySQLEstateData.cs | 2 +- OpenSim/Data/Tests/BasicEstateTest.cs | 15 --------------- 2 files changed, 1 insertion(+), 16 deletions(-) (limited to 'OpenSim/Data') diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs index 8e8c88f..0db624d 100644 --- a/OpenSim/Data/MySQL/MySQLEstateData.cs +++ b/OpenSim/Data/MySQL/MySQLEstateData.cs @@ -335,7 +335,7 @@ namespace OpenSim.Data.MySQL cmd.Parameters.Clear(); - cmd.CommandText = "insert into estateban (EstateID, bannedUUID) values ( ?EstateID, ?bannedUUID )"; + cmd.CommandText = "insert into estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask) values ( ?EstateID, ?bannedUUID, '', '', '' )"; foreach (EstateBan b in es.EstateBans) { diff --git a/OpenSim/Data/Tests/BasicEstateTest.cs b/OpenSim/Data/Tests/BasicEstateTest.cs index 04ff8ec..b37a392 100644 --- a/OpenSim/Data/Tests/BasicEstateTest.cs +++ b/OpenSim/Data/Tests/BasicEstateTest.cs @@ -219,22 +219,13 @@ namespace OpenSim.Data.Tests [Test] public void T022_EstateSettingsBanList() { - // This is not working on native MySQL so ignoring. - Assert.Ignore(); - // Letting estate store generate rows to database for us EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID); EstateBan estateBan1 = new EstateBan(); - estateBan1.bannedIP = DataTestUtil.STRING_MIN; - estateBan1.bannedIPHostMask = DataTestUtil.STRING_MIN; - estateBan1.bannedNameMask = DataTestUtil.STRING_MIN; estateBan1.bannedUUID = DataTestUtil.UUID_MIN; EstateBan estateBan2 = new EstateBan(); - estateBan2.bannedIP = DataTestUtil.STRING_MAX(16); - estateBan2.bannedIPHostMask = DataTestUtil.STRING_MAX(16); - estateBan2.bannedNameMask = DataTestUtil.STRING_MAX(64); estateBan2.bannedUUID = DataTestUtil.UUID_MAX; originalSettings.EstateBans = new EstateBan[] { estateBan1, estateBan2 }; @@ -246,14 +237,8 @@ namespace OpenSim.Data.Tests EstateSettings loadedSettings = db.LoadEstateSettings(REGION_ID); Assert.AreEqual(2, loadedSettings.EstateBans.Length); - Assert.AreEqual(DataTestUtil.STRING_MIN, loadedSettings.EstateBans[0].bannedIP); - Assert.AreEqual(DataTestUtil.STRING_MIN, loadedSettings.EstateBans[0].bannedIPHostMask); - Assert.AreEqual(DataTestUtil.STRING_MIN, loadedSettings.EstateBans[0].bannedNameMask); Assert.AreEqual(DataTestUtil.UUID_MIN, loadedSettings.EstateBans[0].bannedUUID); - Assert.AreEqual(DataTestUtil.STRING_MAX(16), loadedSettings.EstateBans[1].bannedIP); - Assert.AreEqual(DataTestUtil.STRING_MAX(16), loadedSettings.EstateBans[1].bannedIPHostMask); - Assert.AreEqual(DataTestUtil.STRING_MAX(64), loadedSettings.EstateBans[1].bannedNameMask); Assert.AreEqual(DataTestUtil.UUID_MAX, loadedSettings.EstateBans[1].bannedUUID); } -- cgit v1.1