minor: Simplify test setup in SceneObjectDeRezTests since permissions module doesn't need different configuration anymore

user_profiles
Justin Clark-Casey (justincc) 2013-05-09 16:43:16 +01:00
parent 543d1fe70b
commit 641c636790
1 changed files with 4 additions and 10 deletions

View File

@ -59,15 +59,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
public void TestDeRezSceneObject() public void TestDeRezSceneObject()
{ {
TestHelpers.InMethod(); TestHelpers.InMethod();
// log4net.Config.XmlConfigurator.Configure();
UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001");
TestScene scene = new SceneHelpers().SetupScene(); TestScene scene = new SceneHelpers().SetupScene();
IConfigSource configSource = new IniConfigSource(); SceneHelpers.SetupSceneModules(scene, new object[] { new PermissionsModule() });
IConfig config = configSource.AddConfig("Startup");
config.Set("serverside_object_permissions", true);
SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new PermissionsModule() });
IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient;
// Turn off the timer on the async sog deleter - we'll crank it by hand for this test. // Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
@ -97,8 +93,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
/// <summary> /// <summary>
/// Test deleting an object from a scene where the deleter is not the owner /// Test deleting an object from a scene where the deleter is not the owner
/// </summary> /// </summary>
/// /// <remarks>
/// This test assumes that the deleter is not a god. /// This test assumes that the deleter is not a god.
/// </remarks>
[Test] [Test]
public void TestDeRezSceneObjectNotOwner() public void TestDeRezSceneObjectNotOwner()
{ {
@ -109,10 +106,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
UUID objectOwnerId = UUID.Parse("20000000-0000-0000-0000-000000000001"); UUID objectOwnerId = UUID.Parse("20000000-0000-0000-0000-000000000001");
TestScene scene = new SceneHelpers().SetupScene(); TestScene scene = new SceneHelpers().SetupScene();
IConfigSource configSource = new IniConfigSource(); SceneHelpers.SetupSceneModules(scene, new object[] { new PermissionsModule() });
IConfig config = configSource.AddConfig("Startup");
config.Set("serverside_object_permissions", true);
SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new PermissionsModule() });
IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient;
// Turn off the timer on the async sog deleter - we'll crank it by hand for this test. // Turn off the timer on the async sog deleter - we'll crank it by hand for this test.