Put some CapabilitiesModule null checks in Scene

Stop tests setting up a capabilities module by default
This commit is contained in:
Justin Clark-Casey (justincc)
2011-02-18 23:50:54 +00:00
parent 8249d77991
commit 60fe3d48ee
4 changed files with 20 additions and 11 deletions

View File

@@ -560,8 +560,11 @@ namespace OpenSim.Tests.Common.Mock
agentData.lastname = m_lastName;
ICapabilitiesModule capsModule = m_scene.RequestModuleInterface<ICapabilitiesModule>();
agentData.CapsPath = capsModule.GetCapsPath(m_agentId);
agentData.ChildrenCapSeeds = new Dictionary<ulong, string>(capsModule.GetChildrenSeeds(m_agentId));
if (capsModule != null)
{
agentData.CapsPath = capsModule.GetCapsPath(m_agentId);
agentData.ChildrenCapSeeds = new Dictionary<ulong, string>(capsModule.GetChildrenSeeds(m_agentId));
}
return agentData;
}

View File

@@ -164,10 +164,10 @@ namespace OpenSim.Tests.Common.Setup
TestScene testScene = new TestScene(
regInfo, acm, scs, simDataService, estateDataService, null, false, false, false, configSource, null);
INonSharedRegionModule capsModule = new CapabilitiesModule();
capsModule.Initialise(new IniConfigSource());
testScene.AddRegionModule(capsModule.Name, capsModule);
capsModule.AddRegion(testScene);
// INonSharedRegionModule capsModule = new CapabilitiesModule();
// capsModule.Initialise(new IniConfigSource());
// testScene.AddRegionModule(capsModule.Name, capsModule);
// capsModule.AddRegion(testScene);
IRegionModule godsModule = new GodsModule();
godsModule.Initialise(testScene, new IniConfigSource());