aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-01-22 19:46:31 +0000
committerJustin Clarke Casey2009-01-22 19:46:31 +0000
commit884009ed33eab204588cc3978a46abff1098b832 (patch)
treed6a714d3c29396e0e85fecfe31788d3953662310 /OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs
parent* Remove a few unnecessary locks to try and prevent lock contention in LLImag... (diff)
downloadopensim-SC-884009ed33eab204588cc3978a46abff1098b832.zip
opensim-SC-884009ed33eab204588cc3978a46abff1098b832.tar.gz
opensim-SC-884009ed33eab204588cc3978a46abff1098b832.tar.bz2
opensim-SC-884009ed33eab204588cc3978a46abff1098b832.tar.xz
* Add some caps seed capability path checking to the simple non neighbours standalone region teleport test
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs25
1 files changed, 21 insertions, 4 deletions
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
74 sceneB.SetModuleInterfaces(); 74 sceneB.SetModuleInterfaces();
75 sceneB.RegisterRegionWithGrid(); 75 sceneB.RegisterRegionWithGrid();
76 76
77 UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000041"); 77 UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000041");
78
79 TestClient client = SceneTestUtils.AddRootAgent(sceneA, agentId); 78 TestClient client = SceneTestUtils.AddRootAgent(sceneA, agentId);
79
80 ICapabilitiesModule sceneACapsModule = sceneA.RequestModuleInterface<ICapabilitiesModule>();
80 81
82 Assert.That(
83 sceneACapsModule.GetCapsPath(agentId),
84 Is.EqualTo(client.CapsSeedUrl),
85 "Incorrect caps object path set up in sceneA");
86
81 // FIXME: This is a hack to get the test working - really the normal OpenSim mechanisms should be used. 87 // FIXME: This is a hack to get the test working - really the normal OpenSim mechanisms should be used.
82 client.TeleportTargetScene = sceneB; 88 client.TeleportTargetScene = sceneB;
83
84 client.Teleport(sceneB.RegionInfo.RegionHandle, new Vector3(100, 100, 100), new Vector3(40, 40, 40)); 89 client.Teleport(sceneB.RegionInfo.RegionHandle, new Vector3(100, 100, 100), new Vector3(40, 40, 40));
90
85 Assert.That(sceneB.GetScenePresence(agentId), Is.Not.Null, "Client does not have an agent in sceneB"); 91 Assert.That(sceneB.GetScenePresence(agentId), Is.Not.Null, "Client does not have an agent in sceneB");
86 Assert.That(sceneA.GetScenePresence(agentId), Is.Null, "Client still had an agent in sceneA"); 92 Assert.That(sceneA.GetScenePresence(agentId), Is.Null, "Client still had an agent in sceneA");
87 93
94 ICapabilitiesModule sceneBCapsModule = sceneB.RequestModuleInterface<ICapabilitiesModule>();
95
96 // Temporary assertion - caps url construction should at least be doable through a method.
97 Assert.That(
98 "http://" + sceneB.RegionInfo.ExternalHostName + ":" + sceneB.RegionInfo.HttpPort + "/CAPS/" + sceneBCapsModule.GetCapsPath(agentId) + "0000/",
99 Is.EqualTo(client.CapsSeedUrl),
100 "Incorrect caps object path set up in sceneB");
101
102 // This assertion will currently fail since we don't remove the caps paths when no longer needed
103 //Assert.That(sceneACapsModule.GetCapsPath(agentId), Is.Null, "sceneA still had a caps object path");
104
88 // TODO: Check that more of everything is as it should be 105 // TODO: Check that more of everything is as it should be
89 106
90 // TODO: test what happens if we try to teleport to a region that doesn't exist 107 // TODO: test what happens if we try to teleport to a region that doesn't exist