aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorArthur Valadares2009-08-11 12:07:54 -0300
committerArthur Valadares2009-08-11 12:07:54 -0300
commit18aa2ea0c5ebd8d5131902ed9856e68f46e76e11 (patch)
treec4adcda365c46052c3d15b4e6395e1bb8a2e97c5 /OpenSim/Region/CoreModules
parentReplace the Replaceable modules name (diff)
downloadopensim-SC_OLD-18aa2ea0c5ebd8d5131902ed9856e68f46e76e11.zip
opensim-SC_OLD-18aa2ea0c5ebd8d5131902ed9856e68f46e76e11.tar.gz
opensim-SC_OLD-18aa2ea0c5ebd8d5131902ed9856e68f46e76e11.tar.bz2
opensim-SC_OLD-18aa2ea0c5ebd8d5131902ed9856e68f46e76e11.tar.xz
* Improves SceneSetupHelper to allow the tester to choose a real or mock, inventory and asset, service modules. The boolean startServices was replaced with realServices string. If the string contains the word asset, it will start a real asset module, if it contains inventory, it starts a real inventory. Otherwise, it use mock (NullPlugin-like) objects, for tests that don't really need functionality.
* SetupScene is now actually sharing the asset and inventory modules if the tester wishes to have multiple regions connected. To link regions, just start SetupScene with the same CommunicationManager for all scenes. SceneSetupHelper will hold a static reference to the modules and won't initialize them again, just run the scenes through the modules AddRegion, RegionLoaded and PostInitialize. * With the recent changes, both asset and inventory (and in the future, user) services should always be asked from the scene, not instantiated alone. The tests should reflect this new behavior and always start a scene.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs2
3 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
index 12d3e95..1480512 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
@@ -74,7 +74,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
74 74
75 InventoryArchiverModule archiverModule = new InventoryArchiverModule(); 75 InventoryArchiverModule archiverModule = new InventoryArchiverModule();
76 76
77 Scene scene = SceneSetupHelpers.SetupScene(false); 77 Scene scene = SceneSetupHelpers.SetupScene("");
78 SceneSetupHelpers.SetupSceneModules(scene, archiverModule); 78 SceneSetupHelpers.SetupSceneModules(scene, archiverModule);
79 CommunicationsManager cm = scene.CommsManager; 79 CommunicationsManager cm = scene.CommsManager;
80 80
@@ -363,7 +363,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
363 public void TestReplicateArchivePathToUserInventory() 363 public void TestReplicateArchivePathToUserInventory()
364 { 364 {
365 TestHelper.InMethod(); 365 TestHelper.InMethod();
366 Scene scene = SceneSetupHelpers.SetupScene(false); 366 Scene scene = SceneSetupHelpers.SetupScene("");
367 CommunicationsManager commsManager = scene.CommsManager; 367 CommunicationsManager commsManager = scene.CommsManager;
368 368
369 CachedUserInfo userInfo = UserProfileTestUtils.CreateUserWithInventory(commsManager); 369 CachedUserInfo userInfo = UserProfileTestUtils.CreateUserWithInventory(commsManager);
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
index ed280c8..5c42e94 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
@@ -87,7 +87,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
87 SerialiserModule serialiserModule = new SerialiserModule(); 87 SerialiserModule serialiserModule = new SerialiserModule();
88 TerrainModule terrainModule = new TerrainModule(); 88 TerrainModule terrainModule = new TerrainModule();
89 89
90 Scene scene = SceneSetupHelpers.SetupScene(false); 90 Scene scene = SceneSetupHelpers.SetupScene("asset");
91 SceneSetupHelpers.SetupSceneModules(scene, archiverModule, serialiserModule, terrainModule); 91 SceneSetupHelpers.SetupSceneModules(scene, archiverModule, serialiserModule, terrainModule);
92 92
93 SceneObjectPart part1; 93 SceneObjectPart part1;
diff --git a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs
index c894d8e..373b6ab 100644
--- a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs
+++ b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs
@@ -237,7 +237,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
237 public void Init() 237 public void Init()
238 { 238 {
239 m_serialiserModule = new SerialiserModule(); 239 m_serialiserModule = new SerialiserModule();
240 m_scene = SceneSetupHelpers.SetupScene(false); 240 m_scene = SceneSetupHelpers.SetupScene("");
241 SceneSetupHelpers.SetupSceneModules(m_scene, m_serialiserModule); 241 SceneSetupHelpers.SetupSceneModules(m_scene, m_serialiserModule);
242 } 242 }
243 243