Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
commit
37d2b6243b
|
@ -101,7 +101,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
|||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
InventoryArchiverModule archiverModule = new InventoryArchiverModule();
|
||||
Scene scene = SceneSetupHelpers.SetupScene("Inventory");
|
||||
Scene scene = SceneSetupHelpers.SetupScene();
|
||||
SceneSetupHelpers.SetupSceneModules(scene, archiverModule);
|
||||
|
||||
UserProfileTestUtils.CreateUserWithInventory(scene, m_uaLL1, "hampshire");
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
|||
SerialiserModule serialiserModule = new SerialiserModule();
|
||||
m_archiverModule = new InventoryArchiverModule();
|
||||
|
||||
m_scene = SceneSetupHelpers.SetupScene("asset inventory");
|
||||
m_scene = SceneSetupHelpers.SetupScene();
|
||||
SceneSetupHelpers.SetupSceneModules(m_scene, serialiserModule, m_archiverModule);
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
|||
|
||||
InventoryArchiverModule archiverModule = new InventoryArchiverModule();
|
||||
|
||||
Scene scene = SceneSetupHelpers.SetupScene("Inventory");
|
||||
Scene scene = SceneSetupHelpers.SetupScene();
|
||||
SceneSetupHelpers.SetupSceneModules(scene, archiverModule);
|
||||
|
||||
// Create user
|
||||
|
@ -180,7 +180,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
|||
InventoryArchiverModule archiverModule = new InventoryArchiverModule();
|
||||
|
||||
// Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene
|
||||
Scene scene = SceneSetupHelpers.SetupScene("inventory");
|
||||
Scene scene = SceneSetupHelpers.SetupScene();
|
||||
|
||||
SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule);
|
||||
|
||||
|
@ -223,7 +223,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
|||
|
||||
SerialiserModule serialiserModule = new SerialiserModule();
|
||||
InventoryArchiverModule archiverModule = new InventoryArchiverModule();
|
||||
Scene scene = SceneSetupHelpers.SetupScene("inventory");
|
||||
Scene scene = SceneSetupHelpers.SetupScene();
|
||||
SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule);
|
||||
|
||||
UserProfileTestUtils.CreateUserWithInventory(scene, m_uaMT, "password");
|
||||
|
@ -248,7 +248,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
|||
|
||||
InventoryArchiverModule archiverModule = new InventoryArchiverModule();
|
||||
|
||||
Scene scene = SceneSetupHelpers.SetupScene("Inventory");
|
||||
Scene scene = SceneSetupHelpers.SetupScene();
|
||||
SceneSetupHelpers.SetupSceneModules(scene, archiverModule);
|
||||
|
||||
// Create user
|
||||
|
@ -327,7 +327,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
|||
TestHelper.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
Scene scene = SceneSetupHelpers.SetupScene("inventory");
|
||||
Scene scene = SceneSetupHelpers.SetupScene();
|
||||
UserAccount ua1 = UserProfileTestUtils.CreateUserWithInventory(scene);
|
||||
|
||||
Dictionary <string, InventoryFolderBase> foldersCreated = new Dictionary<string, InventoryFolderBase>();
|
||||
|
@ -394,7 +394,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
|||
TestHelper.InMethod();
|
||||
//log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
Scene scene = SceneSetupHelpers.SetupScene("inventory");
|
||||
Scene scene = SceneSetupHelpers.SetupScene();
|
||||
UserAccount ua1 = UserProfileTestUtils.CreateUserWithInventory(scene);
|
||||
|
||||
string folder1ExistingName = "a";
|
||||
|
@ -445,7 +445,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
|||
TestHelper.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
Scene scene = SceneSetupHelpers.SetupScene("inventory");
|
||||
Scene scene = SceneSetupHelpers.SetupScene();
|
||||
UserAccount ua1 = UserProfileTestUtils.CreateUserWithInventory(scene);
|
||||
|
||||
string folder1ExistingName = "a";
|
||||
|
|
|
@ -66,7 +66,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
|
|||
config.AddConfig("Modules");
|
||||
config.Configs["Modules"].Set("InventoryAccessModule", "BasicInventoryAccessModule");
|
||||
|
||||
m_scene = SceneSetupHelpers.SetupScene("Inventory");
|
||||
m_scene = SceneSetupHelpers.SetupScene();
|
||||
SceneSetupHelpers.SetupSceneModules(m_scene, config, m_iam);
|
||||
|
||||
// Create user
|
||||
|
|
|
@ -237,7 +237,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
|
|||
public void Init()
|
||||
{
|
||||
m_serialiserModule = new SerialiserModule();
|
||||
m_scene = SceneSetupHelpers.SetupScene("");
|
||||
m_scene = SceneSetupHelpers.SetupScene();
|
||||
SceneSetupHelpers.SetupSceneModules(m_scene, m_serialiserModule);
|
||||
}
|
||||
|
||||
|
|
|
@ -117,11 +117,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
|||
ISharedRegionModule interregionComms = new LocalSimulationConnectorModule();
|
||||
|
||||
|
||||
Scene sceneB = SceneSetupHelpers.SetupScene("sceneB", sceneBId, 1010, 1010, "grid");
|
||||
Scene sceneB = SceneSetupHelpers.SetupScene("sceneB", sceneBId, 1010, 1010);
|
||||
SceneSetupHelpers.SetupSceneModules(sceneB, new IniConfigSource(), interregionComms);
|
||||
sceneB.RegisterRegionWithGrid();
|
||||
|
||||
Scene sceneA = SceneSetupHelpers.SetupScene("sceneA", sceneAId, 1000, 1000, "grid");
|
||||
Scene sceneA = SceneSetupHelpers.SetupScene("sceneA", sceneAId, 1000, 1000);
|
||||
SceneSetupHelpers.SetupSceneModules(sceneA, new IniConfigSource(), interregionComms);
|
||||
sceneA.RegisterRegionWithGrid();
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ namespace OpenSim.Region.Framework.Tests
|
|||
TestHelper.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
Scene scene = SceneSetupHelpers.SetupScene("inventory");
|
||||
Scene scene = SceneSetupHelpers.SetupScene();
|
||||
UserAccount user1 = CreateUser(scene);
|
||||
SceneObjectGroup sog1 = CreateSO1(scene, user1.PrincipalID);
|
||||
SceneObjectPart sop1 = sog1.RootPart;
|
||||
|
@ -127,7 +127,7 @@ namespace OpenSim.Region.Framework.Tests
|
|||
TestHelper.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
Scene scene = SceneSetupHelpers.SetupScene("inventory");
|
||||
Scene scene = SceneSetupHelpers.SetupScene();
|
||||
UserAccount user1 = CreateUser(scene);
|
||||
SceneObjectGroup sog1 = CreateSO1(scene, user1.PrincipalID);
|
||||
SceneObjectPart sop1 = sog1.RootPart;
|
||||
|
|
|
@ -66,32 +66,7 @@ namespace OpenSim.Tests.Common.Setup
|
|||
/// <returns></returns>
|
||||
public static TestScene SetupScene()
|
||||
{
|
||||
return SetupScene("");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set up a test scene
|
||||
/// </summary>
|
||||
///
|
||||
/// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param>
|
||||
/// <returns></returns>
|
||||
public static TestScene SetupScene(String realServices)
|
||||
{
|
||||
return SetupScene("Unit test region", UUID.Random(), 1000, 1000, realServices);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set up a test scene
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the region</param>
|
||||
/// <param name="id">ID of the region</param>
|
||||
/// <param name="x">X co-ordinate of the region</param>
|
||||
/// <param name="y">Y co-ordinate of the region</param>
|
||||
/// <param name="cm">This should be the same if simulating two scenes within a standalone</param>
|
||||
/// <returns></returns>
|
||||
public static TestScene SetupScene(string name, UUID id, uint x, uint y)
|
||||
{
|
||||
return SetupScene(name, id, x, y, "");
|
||||
return SetupScene("Unit test region", UUID.Random(), 1000, 1000);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -103,10 +78,8 @@ namespace OpenSim.Tests.Common.Setup
|
|||
/// <param name="x">X co-ordinate of the region</param>
|
||||
/// <param name="y">Y co-ordinate of the region</param>
|
||||
/// <param name="cm">This should be the same if simulating two scenes within a standalone</param>
|
||||
/// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param>
|
||||
/// <returns></returns>
|
||||
public static TestScene SetupScene(
|
||||
string name, UUID id, uint x, uint y, String realServices)
|
||||
public static TestScene SetupScene(string name, UUID id, uint x, uint y)
|
||||
{
|
||||
Console.WriteLine("Setting up test scene {0}", name);
|
||||
|
||||
|
@ -130,12 +103,11 @@ namespace OpenSim.Tests.Common.Setup
|
|||
IRegionModule godsModule = new GodsModule();
|
||||
godsModule.Initialise(testScene, new IniConfigSource());
|
||||
testScene.AddModule(godsModule.Name, godsModule);
|
||||
realServices = realServices.ToLower();
|
||||
|
||||
LocalAssetServicesConnector assetService = StartAssetService(testScene);
|
||||
StartAuthenticationService(testScene);
|
||||
LocalInventoryServicesConnector inventoryService = StartInventoryService(testScene);
|
||||
StartGridService(testScene, true);
|
||||
StartGridService(testScene);
|
||||
LocalUserAccountServicesConnector userAccountService = StartUserAccountService(testScene);
|
||||
LocalPresenceServicesConnector presenceService = StartPresenceService(testScene);
|
||||
|
||||
|
@ -218,24 +190,19 @@ namespace OpenSim.Tests.Common.Setup
|
|||
return inventoryService;
|
||||
}
|
||||
|
||||
private static LocalGridServicesConnector StartGridService(Scene testScene, bool real)
|
||||
private static LocalGridServicesConnector StartGridService(Scene testScene)
|
||||
{
|
||||
IConfigSource config = new IniConfigSource();
|
||||
config.AddConfig("Modules");
|
||||
config.AddConfig("GridService");
|
||||
config.Configs["Modules"].Set("GridServices", "LocalGridServicesConnector");
|
||||
config.Configs["GridService"].Set("StorageProvider", "OpenSim.Data.Null.dll:NullRegionData");
|
||||
if (real)
|
||||
config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Services.GridService.dll:GridService");
|
||||
|
||||
LocalGridServicesConnector gridService = new LocalGridServicesConnector();
|
||||
gridService.Initialise(config);
|
||||
|
||||
//else
|
||||
// config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:TestGridService");
|
||||
gridService.AddRegion(testScene);
|
||||
gridService.RegionLoaded(testScene);
|
||||
//testScene.AddRegionModule(m_gridService.Name, m_gridService);
|
||||
|
||||
return gridService;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue