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
							parent
							
								
									e4dd526b0d
								
							
						
					
					
						commit
						a70efd1fdf
					
				| 
						 | 
				
			
			@ -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");
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue