From 884009ed33eab204588cc3978a46abff1098b832 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 22 Jan 2009 19:46:31 +0000 Subject: * Add some caps seed capability path checking to the simple non neighbours standalone region teleport test --- .../Scenes/Tests/StandaloneTeleportTests.cs | 25 ++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs') diff --git a/OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs b/OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs index a61b9c2..3bc8467 100644 --- a/OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs +++ b/OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs @@ -74,17 +74,34 @@ namespace OpenSim.Region.Environment.Scenes.Tests sceneB.SetModuleInterfaces(); sceneB.RegisterRegionWithGrid(); - UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000041"); - + UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000041"); TestClient client = SceneTestUtils.AddRootAgent(sceneA, agentId); + + ICapabilitiesModule sceneACapsModule = sceneA.RequestModuleInterface(); + Assert.That( + sceneACapsModule.GetCapsPath(agentId), + Is.EqualTo(client.CapsSeedUrl), + "Incorrect caps object path set up in sceneA"); + // FIXME: This is a hack to get the test working - really the normal OpenSim mechanisms should be used. - client.TeleportTargetScene = sceneB; - + client.TeleportTargetScene = sceneB; client.Teleport(sceneB.RegionInfo.RegionHandle, new Vector3(100, 100, 100), new Vector3(40, 40, 40)); + Assert.That(sceneB.GetScenePresence(agentId), Is.Not.Null, "Client does not have an agent in sceneB"); Assert.That(sceneA.GetScenePresence(agentId), Is.Null, "Client still had an agent in sceneA"); + ICapabilitiesModule sceneBCapsModule = sceneB.RequestModuleInterface(); + + // Temporary assertion - caps url construction should at least be doable through a method. + Assert.That( + "http://" + sceneB.RegionInfo.ExternalHostName + ":" + sceneB.RegionInfo.HttpPort + "/CAPS/" + sceneBCapsModule.GetCapsPath(agentId) + "0000/", + Is.EqualTo(client.CapsSeedUrl), + "Incorrect caps object path set up in sceneB"); + + // This assertion will currently fail since we don't remove the caps paths when no longer needed + //Assert.That(sceneACapsModule.GetCapsPath(agentId), Is.Null, "sceneA still had a caps object path"); + // TODO: Check that more of everything is as it should be // TODO: test what happens if we try to teleport to a region that doesn't exist -- cgit v1.1