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 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]
public void Init()
{
SuperInit();
Assert.Ignore();
file = Path.GetTempFileName() + ".db";
connect = "URI=file:" + file + ",version=3";
try
{
database = new MySQLManager(connect);
db = new MySQLInventoryData();
db.Initialise(connect);
}
catch (Exception e)
{
System.Console.WriteLine("Exception {0}", e);
Assert.Ignore();
}
}
[TestFixtureTearDown]
public void Cleanup()
{
if (database != null)
{
database.ExecuteSql("drop table migrations");
database.ExecuteSql("drop table inventoryitems");
database.ExecuteSql("drop table inventoryfolders");
}
}
}
}