aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/Tests
diff options
context:
space:
mode:
authorDavid Walter Seikel2016-11-03 21:44:39 +1000
committerDavid Walter Seikel2016-11-03 21:44:39 +1000
commit134f86e8d5c414409631b25b8c6f0ee45fbd8631 (patch)
tree216b89d3fb89acfb81be1e440c25c41ab09fa96d /OpenSim/Data/Tests
parentMore changing to production grid. Double oops. (diff)
downloadopensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.zip
opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.gz
opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.bz2
opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.xz
Initial update to OpenSim 0.8.2.1 source code.
Diffstat (limited to 'OpenSim/Data/Tests')
-rw-r--r--OpenSim/Data/Tests/AssetTests.cs24
-rw-r--r--OpenSim/Data/Tests/BasicDataServiceTest.cs3
-rw-r--r--OpenSim/Data/Tests/EstateTests.cs8
-rw-r--r--OpenSim/Data/Tests/InventoryTests.cs8
-rw-r--r--OpenSim/Data/Tests/RegionTests.cs8
5 files changed, 12 insertions, 39 deletions
diff --git a/OpenSim/Data/Tests/AssetTests.cs b/OpenSim/Data/Tests/AssetTests.cs
index 8cb2ee0..5d7b169 100644
--- a/OpenSim/Data/Tests/AssetTests.cs
+++ b/OpenSim/Data/Tests/AssetTests.cs
@@ -40,9 +40,6 @@ using log4net;
40using MySql.Data.MySqlClient; 40using MySql.Data.MySqlClient;
41using OpenSim.Data.MySQL; 41using OpenSim.Data.MySQL;
42 42
43using System.Data.SqlClient;
44using OpenSim.Data.MSSQL;
45
46using Mono.Data.Sqlite; 43using Mono.Data.Sqlite;
47using OpenSim.Data.SQLite; 44using OpenSim.Data.SQLite;
48 45
@@ -58,11 +55,6 @@ namespace OpenSim.Data.Tests
58 { 55 {
59 } 56 }
60 57
61 [TestFixture(Description = "Asset store tests (MS SQL Server)")]
62 public class MSSQLAssetTests : AssetTests<SqlConnection, MSSQLAssetData>
63 {
64 }
65
66 public class AssetTests<TConn, TAssetData> : BasicDataServiceTest<TConn, TAssetData> 58 public class AssetTests<TConn, TAssetData> : BasicDataServiceTest<TConn, TAssetData>
67 where TConn : DbConnection, new() 59 where TConn : DbConnection, new()
68 where TAssetData : AssetDataBase, new() 60 where TAssetData : AssetDataBase, new()
@@ -107,10 +99,11 @@ namespace OpenSim.Data.Tests
107 public void T001_LoadEmpty() 99 public void T001_LoadEmpty()
108 { 100 {
109 TestHelpers.InMethod(); 101 TestHelpers.InMethod();
110 102
111 Assert.That(m_db.ExistsAsset(uuid1), Is.False); 103 bool[] exist = m_db.AssetsExist(new[] { uuid1, uuid2, uuid3 });
112 Assert.That(m_db.ExistsAsset(uuid2), Is.False); 104 Assert.IsFalse(exist[0]);
113 Assert.That(m_db.ExistsAsset(uuid3), Is.False); 105 Assert.IsFalse(exist[1]);
106 Assert.IsFalse(exist[2]);
114 } 107 }
115 108
116 [Test] 109 [Test]
@@ -159,9 +152,10 @@ namespace OpenSim.Data.Tests
159 AssetBase a3b = m_db.GetAsset(uuid3); 152 AssetBase a3b = m_db.GetAsset(uuid3);
160 Assert.That(a3b, Constraints.PropertyCompareConstraint(a3a)); 153 Assert.That(a3b, Constraints.PropertyCompareConstraint(a3a));
161 154
162 Assert.That(m_db.ExistsAsset(uuid1), Is.True); 155 bool[] exist = m_db.AssetsExist(new[] { uuid1, uuid2, uuid3 });
163 Assert.That(m_db.ExistsAsset(uuid2), Is.True); 156 Assert.IsTrue(exist[0]);
164 Assert.That(m_db.ExistsAsset(uuid3), Is.True); 157 Assert.IsTrue(exist[1]);
158 Assert.IsTrue(exist[2]);
165 159
166 List<AssetMetadata> metadatas = m_db.FetchAssetMetadataSet(0, 1000); 160 List<AssetMetadata> metadatas = m_db.FetchAssetMetadataSet(0, 1000);
167 161
diff --git a/OpenSim/Data/Tests/BasicDataServiceTest.cs b/OpenSim/Data/Tests/BasicDataServiceTest.cs
index 69b79bf..acfebd0 100644
--- a/OpenSim/Data/Tests/BasicDataServiceTest.cs
+++ b/OpenSim/Data/Tests/BasicDataServiceTest.cs
@@ -99,6 +99,9 @@ namespace OpenSim.Data.Tests
99 if (Directory.Exists("/proc/ppc64") || Directory.Exists("/proc/dasd")) 99 if (Directory.Exists("/proc/ppc64") || Directory.Exists("/proc/dasd"))
100 Assert.Ignore(); 100 Assert.Ignore();
101 101
102 if (Util.IsWindows())
103 Util.LoadArchSpecificWindowsDll("sqlite3.dll");
104
102 // for SQLite, if no explicit conn string is specified, use a temp file 105 // for SQLite, if no explicit conn string is specified, use a temp file
103 if (String.IsNullOrEmpty(m_connStr)) 106 if (String.IsNullOrEmpty(m_connStr))
104 { 107 {
diff --git a/OpenSim/Data/Tests/EstateTests.cs b/OpenSim/Data/Tests/EstateTests.cs
index 3e47bcf..e2b2d12 100644
--- a/OpenSim/Data/Tests/EstateTests.cs
+++ b/OpenSim/Data/Tests/EstateTests.cs
@@ -41,9 +41,6 @@ using System.Data.Common;
41using MySql.Data.MySqlClient; 41using MySql.Data.MySqlClient;
42using OpenSim.Data.MySQL; 42using OpenSim.Data.MySQL;
43 43
44using System.Data.SqlClient;
45using OpenSim.Data.MSSQL;
46
47using Mono.Data.Sqlite; 44using Mono.Data.Sqlite;
48using OpenSim.Data.SQLite; 45using OpenSim.Data.SQLite;
49 46
@@ -59,11 +56,6 @@ namespace OpenSim.Data.Tests
59 { 56 {
60 } 57 }
61 58
62 [TestFixture(Description = "Estate store tests (MS SQL Server)")]
63 public class MSSQLEstateTests : EstateTests<SqlConnection, MSSQLEstateStore>
64 {
65 }
66
67 public class EstateTests<TConn, TEstateStore> : BasicDataServiceTest<TConn, TEstateStore> 59 public class EstateTests<TConn, TEstateStore> : BasicDataServiceTest<TConn, TEstateStore>
68 where TConn : DbConnection, new() 60 where TConn : DbConnection, new()
69 where TEstateStore : class, IEstateDataStore, new() 61 where TEstateStore : class, IEstateDataStore, new()
diff --git a/OpenSim/Data/Tests/InventoryTests.cs b/OpenSim/Data/Tests/InventoryTests.cs
index 5b6b61b..3edf89d 100644
--- a/OpenSim/Data/Tests/InventoryTests.cs
+++ b/OpenSim/Data/Tests/InventoryTests.cs
@@ -39,9 +39,6 @@ using System.Data.Common;
39using MySql.Data.MySqlClient; 39using MySql.Data.MySqlClient;
40using OpenSim.Data.MySQL; 40using OpenSim.Data.MySQL;
41 41
42using System.Data.SqlClient;
43using OpenSim.Data.MSSQL;
44
45using Mono.Data.Sqlite; 42using Mono.Data.Sqlite;
46using OpenSim.Data.SQLite; 43using OpenSim.Data.SQLite;
47 44
@@ -57,11 +54,6 @@ namespace OpenSim.Data.Tests
57 { 54 {
58 } 55 }
59 56
60 [TestFixture(Description = "Inventory store tests (MS SQL Server)")]
61 public class MSSQLInventoryTests : InventoryTests<SqlConnection, MSSQLInventoryData>
62 {
63 }
64
65 public class InventoryTests<TConn, TInvStore> : BasicDataServiceTest<TConn, TInvStore> 57 public class InventoryTests<TConn, TInvStore> : BasicDataServiceTest<TConn, TInvStore>
66 where TConn : DbConnection, new() 58 where TConn : DbConnection, new()
67 where TInvStore : class, IInventoryDataPlugin, new() 59 where TInvStore : class, IInventoryDataPlugin, new()
diff --git a/OpenSim/Data/Tests/RegionTests.cs b/OpenSim/Data/Tests/RegionTests.cs
index dbed8f6..8d4249a 100644
--- a/OpenSim/Data/Tests/RegionTests.cs
+++ b/OpenSim/Data/Tests/RegionTests.cs
@@ -44,9 +44,6 @@ using System.Data.Common;
44using MySql.Data.MySqlClient; 44using MySql.Data.MySqlClient;
45using OpenSim.Data.MySQL; 45using OpenSim.Data.MySQL;
46 46
47using System.Data.SqlClient;
48using OpenSim.Data.MSSQL;
49
50using Mono.Data.Sqlite; 47using Mono.Data.Sqlite;
51using OpenSim.Data.SQLite; 48using OpenSim.Data.SQLite;
52 49
@@ -62,11 +59,6 @@ namespace OpenSim.Data.Tests
62 { 59 {
63 } 60 }
64 61
65 [TestFixture(Description = "Region store tests (MS SQL Server)")]
66 public class MSSQLRegionTests : RegionTests<SqlConnection, MSSQLSimulationData>
67 {
68 }
69
70 public class RegionTests<TConn, TRegStore> : BasicDataServiceTest<TConn, TRegStore> 62 public class RegionTests<TConn, TRegStore> : BasicDataServiceTest<TConn, TRegStore>
71 where TConn : DbConnection, new() 63 where TConn : DbConnection, new()
72 where TRegStore : class, ISimulationDataStore, new() 64 where TRegStore : class, ISimulationDataStore, new()