aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/Tests/EstateTests.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/Tests/EstateTests.cs (renamed from OpenSim/Data/Tests/BasicEstateTest.cs)51
1 files changed, 47 insertions, 4 deletions
diff --git a/OpenSim/Data/Tests/BasicEstateTest.cs b/OpenSim/Data/Tests/EstateTests.cs
index d14d405..7f13925 100644
--- a/OpenSim/Data/Tests/BasicEstateTest.cs
+++ b/OpenSim/Data/Tests/EstateTests.cs
@@ -35,13 +35,31 @@ using OpenSim.Region.Framework.Interfaces;
35using System.Text; 35using System.Text;
36using log4net; 36using log4net;
37using System.Reflection; 37using System.Reflection;
38using System.Data.Common;
39
40
41// DBMS-specific:
42using MySql.Data.MySqlClient;
43using OpenSim.Data.MySQL;
44
45using System.Data.SqlClient;
46using OpenSim.Data.MSSQL;
47
48using Mono.Data.Sqlite;
49using OpenSim.Data.SQLite;
50
38 51
39namespace OpenSim.Data.Tests 52namespace OpenSim.Data.Tests
40{ 53{
41 public class BasicEstateTest 54 [TestFixture(typeof(MySqlConnection), typeof(MySQLEstateStore), Description = "Estate store tests (MySQL)")]
55 [TestFixture(typeof(SqlConnection), typeof(MSSQLEstateStore), Description = "Estate store tests (MS SQL Server)")]
56 [TestFixture(typeof(SqliteConnection), typeof(SQLiteEstateStore), Description = "Estate store tests (SQLite)")]
57
58 public class EstateTests<TConn, TEstateStore> : BasicDataServiceTest<TConn, TEstateStore>
59 where TConn : DbConnection, new()
60 where TEstateStore : class, IEstateDataStore, new()
42 { 61 {
43 public IEstateDataStore db; 62 public IEstateDataStore db;
44 public IRegionDataStore regionDb;
45 63
46 public static UUID REGION_ID = new UUID("250d214e-1c7e-4f9b-a488-87c5e53feed7"); 64 public static UUID REGION_ID = new UUID("250d214e-1c7e-4f9b-a488-87c5e53feed7");
47 65
@@ -54,9 +72,34 @@ namespace OpenSim.Data.Tests
54 public static UUID GROUP_ID_1 = new UUID("250d214e-1c7e-4f9b-a488-87c5e53feed5"); 72 public static UUID GROUP_ID_1 = new UUID("250d214e-1c7e-4f9b-a488-87c5e53feed5");
55 public static UUID GROUP_ID_2 = new UUID("250d214e-1c7e-4f9b-a488-87c5e53feed6"); 73 public static UUID GROUP_ID_2 = new UUID("250d214e-1c7e-4f9b-a488-87c5e53feed6");
56 74
57 public void SuperInit() 75 protected override void InitService(object service)
76 {
77 db = (IEstateDataStore)service;
78 db.Initialise(m_connStr);
79 ClearDB();
80 }
81
82 private void ClearDB()
58 { 83 {
59 OpenSim.Tests.Common.TestLogging.LogToConsole(); 84 // if a new table is added, it has to be dropped here
85 ExecuteSql("delete from migrations where name='EstateStore';");
86
87 DropTables(
88 "prims",
89 "primshapes",
90 "primitems",
91 "terrain",
92 "land",
93 "landaccesslist",
94 "regionban",
95 "regionsettings",
96 "estate_managers",
97 "estate_groups",
98 "estate_users",
99 "estateban",
100 "estate_settings",
101 "estate_map"
102 );
60 } 103 }
61 104
62 #region 0Tests 105 #region 0Tests