diff options
author | David Walter Seikel | 2016-11-03 21:44:39 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-11-03 21:44:39 +1000 |
commit | 134f86e8d5c414409631b25b8c6f0ee45fbd8631 (patch) | |
tree | 216b89d3fb89acfb81be1e440c25c41ab09fa96d /OpenSim/Data/Tests | |
parent | More changing to production grid. Double oops. (diff) | |
download | opensim-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.cs | 24 | ||||
-rw-r--r-- | OpenSim/Data/Tests/BasicDataServiceTest.cs | 3 | ||||
-rw-r--r-- | OpenSim/Data/Tests/EstateTests.cs | 8 | ||||
-rw-r--r-- | OpenSim/Data/Tests/InventoryTests.cs | 8 | ||||
-rw-r--r-- | OpenSim/Data/Tests/RegionTests.cs | 8 |
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; | |||
40 | using MySql.Data.MySqlClient; | 40 | using MySql.Data.MySqlClient; |
41 | using OpenSim.Data.MySQL; | 41 | using OpenSim.Data.MySQL; |
42 | 42 | ||
43 | using System.Data.SqlClient; | ||
44 | using OpenSim.Data.MSSQL; | ||
45 | |||
46 | using Mono.Data.Sqlite; | 43 | using Mono.Data.Sqlite; |
47 | using OpenSim.Data.SQLite; | 44 | using 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; | |||
41 | using MySql.Data.MySqlClient; | 41 | using MySql.Data.MySqlClient; |
42 | using OpenSim.Data.MySQL; | 42 | using OpenSim.Data.MySQL; |
43 | 43 | ||
44 | using System.Data.SqlClient; | ||
45 | using OpenSim.Data.MSSQL; | ||
46 | |||
47 | using Mono.Data.Sqlite; | 44 | using Mono.Data.Sqlite; |
48 | using OpenSim.Data.SQLite; | 45 | using 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; | |||
39 | using MySql.Data.MySqlClient; | 39 | using MySql.Data.MySqlClient; |
40 | using OpenSim.Data.MySQL; | 40 | using OpenSim.Data.MySQL; |
41 | 41 | ||
42 | using System.Data.SqlClient; | ||
43 | using OpenSim.Data.MSSQL; | ||
44 | |||
45 | using Mono.Data.Sqlite; | 42 | using Mono.Data.Sqlite; |
46 | using OpenSim.Data.SQLite; | 43 | using 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; | |||
44 | using MySql.Data.MySqlClient; | 44 | using MySql.Data.MySqlClient; |
45 | using OpenSim.Data.MySQL; | 45 | using OpenSim.Data.MySQL; |
46 | 46 | ||
47 | using System.Data.SqlClient; | ||
48 | using OpenSim.Data.MSSQL; | ||
49 | |||
50 | using Mono.Data.Sqlite; | 47 | using Mono.Data.Sqlite; |
51 | using OpenSim.Data.SQLite; | 48 | using 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() |