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.
0.6.0-stable
Sean Dague 2008-09-23 21:03:03 +00:00
parent e4dd526b0d
commit a70efd1fdf
1 changed files with 19 additions and 8 deletions

View File

@ -43,24 +43,35 @@ namespace OpenSim.Data.MySQL.Tests
public class MySQLInventoryTest : BasicInventoryTest public class MySQLInventoryTest : BasicInventoryTest
{ {
public string file; public string file;
public string connect; public MySQLManager database;
public string connect = "Server=localhost;Port=3306;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;Pooling=false;";
[TestFixtureSetUp] [TestFixtureSetUp]
public void Init() public void Init()
{ {
SuperInit(); SuperInit();
try
Assert.Ignore(); {
database = new MySQLManager(connect);
file = Path.GetTempFileName() + ".db"; db = new MySQLInventoryData();
connect = "URI=file:" + file + ",version=3"; db.Initialise(connect);
}
catch (Exception e)
{
System.Console.WriteLine("Exception {0}", e);
Assert.Ignore();
}
} }
[TestFixtureTearDown] [TestFixtureTearDown]
public void Cleanup() public void Cleanup()
{ {
if (database != null)
{
database.ExecuteSql("drop table migrations");
database.ExecuteSql("drop table inventoryitems");
database.ExecuteSql("drop table inventoryfolders");
}
} }
} }
} }