diff options
author | Sean Dague | 2008-09-23 21:03:03 +0000 |
---|---|---|
committer | Sean Dague | 2008-09-23 21:03:03 +0000 |
commit | a70efd1fdf6a8de57e8129a27fbc8ba94535b2ab (patch) | |
tree | fe3c48d20f64873295aa76bfb4ed5d8a2e47422f /OpenSim/Data/MySQL/Tests/MySQLInventoryTest.cs | |
parent | trying to force bamboo to have a clean working tree on each go around (diff) | |
download | opensim-SC_OLD-a70efd1fdf6a8de57e8129a27fbc8ba94535b2ab.zip opensim-SC_OLD-a70efd1fdf6a8de57e8129a27fbc8ba94535b2ab.tar.gz opensim-SC_OLD-a70efd1fdf6a8de57e8129a27fbc8ba94535b2ab.tar.bz2 opensim-SC_OLD-a70efd1fdf6a8de57e8129a27fbc8ba94535b2ab.tar.xz |
create the first attempted mysql test. This only runs locally if you
have a database configured as opensim-nunit with user opensim-nunit /
password opensim-nunit that has full perms on the database.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MySQL/Tests/MySQLInventoryTest.cs | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/OpenSim/Data/MySQL/Tests/MySQLInventoryTest.cs b/OpenSim/Data/MySQL/Tests/MySQLInventoryTest.cs index c856b9a..c299452 100644 --- a/OpenSim/Data/MySQL/Tests/MySQLInventoryTest.cs +++ b/OpenSim/Data/MySQL/Tests/MySQLInventoryTest.cs | |||
@@ -43,24 +43,35 @@ namespace OpenSim.Data.MySQL.Tests | |||
43 | public class MySQLInventoryTest : BasicInventoryTest | 43 | public class MySQLInventoryTest : BasicInventoryTest |
44 | { | 44 | { |
45 | public string file; | 45 | public string file; |
46 | public string connect; | 46 | public MySQLManager database; |
47 | public string connect = "Server=localhost;Port=3306;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;Pooling=false;"; | ||
47 | 48 | ||
48 | [TestFixtureSetUp] | 49 | [TestFixtureSetUp] |
49 | public void Init() | 50 | public void Init() |
50 | { | 51 | { |
51 | SuperInit(); | 52 | SuperInit(); |
52 | 53 | try | |
53 | Assert.Ignore(); | 54 | { |
54 | 55 | database = new MySQLManager(connect); | |
55 | file = Path.GetTempFileName() + ".db"; | 56 | db = new MySQLInventoryData(); |
56 | connect = "URI=file:" + file + ",version=3"; | 57 | db.Initialise(connect); |
57 | 58 | } | |
59 | catch (Exception e) | ||
60 | { | ||
61 | System.Console.WriteLine("Exception {0}", e); | ||
62 | Assert.Ignore(); | ||
63 | } | ||
58 | } | 64 | } |
59 | 65 | ||
60 | [TestFixtureTearDown] | 66 | [TestFixtureTearDown] |
61 | public void Cleanup() | 67 | public void Cleanup() |
62 | { | 68 | { |
63 | 69 | if (database != null) | |
70 | { | ||
71 | database.ExecuteSql("drop table migrations"); | ||
72 | database.ExecuteSql("drop table inventoryitems"); | ||
73 | database.ExecuteSql("drop table inventoryfolders"); | ||
74 | } | ||
64 | } | 75 | } |
65 | } | 76 | } |
66 | } | 77 | } |