aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data')
-rw-r--r--OpenSim/Data/Tests/AssetTests.cs8
-rw-r--r--OpenSim/Data/Tests/BasicDataServiceTest.cs3
-rw-r--r--OpenSim/Data/Tests/EstateTests.cs11
-rw-r--r--OpenSim/Data/Tests/InventoryTests.cs8
-rw-r--r--OpenSim/Data/Tests/RegionTests.cs4
5 files changed, 18 insertions, 16 deletions
diff --git a/OpenSim/Data/Tests/AssetTests.cs b/OpenSim/Data/Tests/AssetTests.cs
index d228c1f..d771053 100644
--- a/OpenSim/Data/Tests/AssetTests.cs
+++ b/OpenSim/Data/Tests/AssetTests.cs
@@ -106,10 +106,18 @@ namespace OpenSim.Data.Tests
106 106
107 protected override void InitService(object service) 107 protected override void InitService(object service)
108 { 108 {
109 ClearDB();
109 m_db = (TAssetData)service; 110 m_db = (TAssetData)service;
110 m_db.Initialise(m_connStr); 111 m_db.Initialise(m_connStr);
111 } 112 }
112 113
114 private void ClearDB()
115 {
116 DropTables("assets");
117 ResetMigrations("AssetStore");
118 }
119
120
113 [Test] 121 [Test]
114 public void T001_LoadEmpty() 122 public void T001_LoadEmpty()
115 { 123 {
diff --git a/OpenSim/Data/Tests/BasicDataServiceTest.cs b/OpenSim/Data/Tests/BasicDataServiceTest.cs
index e91a45d..4c7cf28 100644
--- a/OpenSim/Data/Tests/BasicDataServiceTest.cs
+++ b/OpenSim/Data/Tests/BasicDataServiceTest.cs
@@ -183,9 +183,10 @@ namespace OpenSim.Data.Tests
183 lst += ", " + s; 183 lst += ", " + s;
184 } 184 }
185 185
186 string sCond = stores.Length > 1 ? ("in (" + lst + ")") : ("=" + lst);
186 try 187 try
187 { 188 {
188 ExecuteSql("DELETE FROM `migrations` where name in (" + lst + ");"); 189 ExecuteSql("DELETE FROM migrations where name " + sCond);
189 } 190 }
190 catch 191 catch
191 { 192 {
diff --git a/OpenSim/Data/Tests/EstateTests.cs b/OpenSim/Data/Tests/EstateTests.cs
index 2da010d..d6eed3d 100644
--- a/OpenSim/Data/Tests/EstateTests.cs
+++ b/OpenSim/Data/Tests/EstateTests.cs
@@ -108,17 +108,7 @@ namespace OpenSim.Data.Tests
108 private void ClearDB() 108 private void ClearDB()
109 { 109 {
110 // if a new table is added, it has to be dropped here 110 // if a new table is added, it has to be dropped here
111 ExecuteSql("delete from migrations where name='EstateStore';");
112
113 DropTables( 111 DropTables(
114 "prims",
115 "primshapes",
116 "primitems",
117 "terrain",
118 "land",
119 "landaccesslist",
120 "regionban",
121 "regionsettings",
122 "estate_managers", 112 "estate_managers",
123 "estate_groups", 113 "estate_groups",
124 "estate_users", 114 "estate_users",
@@ -126,6 +116,7 @@ namespace OpenSim.Data.Tests
126 "estate_settings", 116 "estate_settings",
127 "estate_map" 117 "estate_map"
128 ); 118 );
119 ResetMigrations("EstateStore");
129 } 120 }
130 121
131 #region 0Tests 122 #region 0Tests
diff --git a/OpenSim/Data/Tests/InventoryTests.cs b/OpenSim/Data/Tests/InventoryTests.cs
index 93e1eba..c22e26c 100644
--- a/OpenSim/Data/Tests/InventoryTests.cs
+++ b/OpenSim/Data/Tests/InventoryTests.cs
@@ -123,7 +123,7 @@ namespace OpenSim.Data.Tests
123 private void ClearDB() 123 private void ClearDB()
124 { 124 {
125 DropTables("inventoryitems", "inventoryfolders"); 125 DropTables("inventoryitems", "inventoryfolders");
126 ExecuteSql("delete from migrations where name='Inventory'"); 126 ResetMigrations("InventoryStore");
127 } 127 }
128 128
129 [Test] 129 [Test]
@@ -194,8 +194,10 @@ namespace OpenSim.Data.Tests
194 [Test] 194 [Test]
195 public void T013_FolderHierarchy() 195 public void T013_FolderHierarchy()
196 { 196 {
197 Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0))"); 197 int n = db.getFolderHierarchy(zero).Count; // (for dbg - easier to see what's returned)
198 Assert.That(db.getFolderHierarchy(folder1).Count, Is.EqualTo(2), "Assert.That(db.getFolderHierarchy(folder1).Count, Is.EqualTo(2))"); 198 Assert.That(n, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0))");
199 n = db.getFolderHierarchy(folder1).Count;
200 Assert.That(n, Is.EqualTo(2), "Assert.That(db.getFolderHierarchy(folder1).Count, Is.EqualTo(2))");
199 Assert.That(db.getFolderHierarchy(folder2).Count, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(folder2).Count, Is.EqualTo(0))"); 201 Assert.That(db.getFolderHierarchy(folder2).Count, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(folder2).Count, Is.EqualTo(0))");
200 Assert.That(db.getFolderHierarchy(folder3).Count, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(folder3).Count, Is.EqualTo(0))"); 202 Assert.That(db.getFolderHierarchy(folder3).Count, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(folder3).Count, Is.EqualTo(0))");
201 Assert.That(db.getFolderHierarchy(UUID.Random()).Count, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(UUID.Random()).Count, Is.EqualTo(0))"); 203 Assert.That(db.getFolderHierarchy(UUID.Random()).Count, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(UUID.Random()).Count, Is.EqualTo(0))");
diff --git a/OpenSim/Data/Tests/RegionTests.cs b/OpenSim/Data/Tests/RegionTests.cs
index 5ac2dd0..1f654d3 100644
--- a/OpenSim/Data/Tests/RegionTests.cs
+++ b/OpenSim/Data/Tests/RegionTests.cs
@@ -118,8 +118,8 @@ namespace OpenSim.Data.Tests
118 m_rebuildDB = rebuild; 118 m_rebuildDB = rebuild;
119 } 119 }
120 120
121 public RegionTests() : this("", false) { } 121 public RegionTests() : this("", true) { }
122 public RegionTests(string conn) : this(conn, false) {} 122 public RegionTests(string conn) : this(conn, true) {}
123 public RegionTests(bool rebuild): this("", rebuild) {} 123 public RegionTests(bool rebuild): this("", rebuild) {}
124 124
125 125