aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-12-14 23:36:34 +0000
committerJustin Clark-Casey (justincc)2010-12-14 23:36:34 +0000
commit81bccd6d132956e2de9e5ad473f87931df76cde8 (patch)
treecbad88a1bad4b95dd91ad4d02b6762504e17ed2e /OpenSim/Tests/Common
parentAdd mock group services connector and use this in tests (diff)
downloadopensim-SC_OLD-81bccd6d132956e2de9e5ad473f87931df76cde8.zip
opensim-SC_OLD-81bccd6d132956e2de9e5ad473f87931df76cde8.tar.gz
opensim-SC_OLD-81bccd6d132956e2de9e5ad473f87931df76cde8.tar.bz2
opensim-SC_OLD-81bccd6d132956e2de9e5ad473f87931df76cde8.tar.xz
Start implementing a test for 'share with group' object functionality. Not yet complete.
While implementing this, a bug was fixed in scene setup helpers where module RegionLoaded() was called immediately after AddRegion() instead of waiting for all AddRegions() to complete. Also, XmlRpcGroupsModule non-message functionality will now work without a message transfer module (as indicated in the comments but with a contradictory implementation)
Diffstat (limited to 'OpenSim/Tests/Common')
-rw-r--r--OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs5
-rw-r--r--OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs5
2 files changed, 7 insertions, 3 deletions
diff --git a/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs b/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs
index aa48754..6fb9df1 100644
--- a/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs
+++ b/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs
@@ -42,7 +42,7 @@ namespace OpenSim.Tests.Common.Mock
42 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 42 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
43 public class MockGroupsServicesConnector : ISharedRegionModule, IGroupsServicesConnector 43 public class MockGroupsServicesConnector : ISharedRegionModule, IGroupsServicesConnector
44 { 44 {
45// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 46
47 public string Name 47 public string Name
48 { 48 {
@@ -64,6 +64,7 @@ namespace OpenSim.Tests.Common.Mock
64 64
65 public void AddRegion(Scene scene) 65 public void AddRegion(Scene scene)
66 { 66 {
67 m_log.DebugFormat("[MOCK GROUPS SERVICES CONNECTOR]: Adding to region {0}", scene.RegionInfo.RegionName);
67 scene.RegisterModuleInterface<IGroupsServicesConnector>(this); 68 scene.RegisterModuleInterface<IGroupsServicesConnector>(this);
68 } 69 }
69 70
@@ -174,7 +175,7 @@ namespace OpenSim.Tests.Common.Mock
174 175
175 public List<GroupMembershipData> GetAgentGroupMemberships(UUID requestingAgentID, UUID AgentID) 176 public List<GroupMembershipData> GetAgentGroupMemberships(UUID requestingAgentID, UUID AgentID)
176 { 177 {
177 return null; 178 return new List<GroupMembershipData>();
178 } 179 }
179 180
180 public List<GroupRolesData> GetAgentGroupRoles(UUID requestingAgentID, UUID AgentID, UUID GroupID) 181 public List<GroupRolesData> GetAgentGroupRoles(UUID requestingAgentID, UUID AgentID, UUID GroupID)
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index 9d7733e..8b16496 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -424,9 +424,12 @@ namespace OpenSim.Tests.Common.Setup
424 foreach (IRegionModuleBase module in newModules) 424 foreach (IRegionModuleBase module in newModules)
425 { 425 {
426 module.AddRegion(scene); 426 module.AddRegion(scene);
427 module.RegionLoaded(scene);
428 scene.AddRegionModule(module.Name, module); 427 scene.AddRegionModule(module.Name, module);
429 } 428 }
429
430 // RegionLoaded is fired after all modules have been appropriately added to all scenes
431 foreach (IRegionModuleBase module in newModules)
432 module.RegionLoaded(scene);
430 433
431 scene.SetModuleInterfaces(); 434 scene.SetModuleInterfaces();
432 } 435 }