aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-08-17 00:37:33 +0100
committerJustin Clark-Casey (justincc)2011-08-17 00:37:33 +0100
commit696bd448334c89607c95385f05a53e2ab72cb984 (patch)
treea061e2f61fb46bb344a48e6d08e627e6239880d5 /OpenSim/Region/CoreModules
parentget rid of logged warnings about lack of some modules - afaik these never occ... (diff)
downloadopensim-SC_OLD-696bd448334c89607c95385f05a53e2ab72cb984.zip
opensim-SC_OLD-696bd448334c89607c95385f05a53e2ab72cb984.tar.gz
opensim-SC_OLD-696bd448334c89607c95385f05a53e2ab72cb984.tar.bz2
opensim-SC_OLD-696bd448334c89607c95385f05a53e2ab72cb984.tar.xz
Add new regression TestRezAttachmentsOnAvatarEntrance() to do simple attachments check
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs22
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs12
3 files changed, 29 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index ebb5bd2..4dbc5e6 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -261,7 +261,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
261 false, false, remoteClient.AgentId, true); 261 false, false, remoteClient.AgentId, true);
262 262
263// m_log.DebugFormat( 263// m_log.DebugFormat(
264// "[ATTACHMENTS MODULE]: Retrieved single object {0} for attachment to {1} on point {2}", 264// "[ATTACHMENTS MODULE]: Retrieved single object {0} for attachment to {1} on point {2}",
265// objatt.Name, remoteClient.Name, AttachmentPt); 265// objatt.Name, remoteClient.Name, AttachmentPt);
266 266
267 if (objatt != null) 267 if (objatt != null)
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
index 7f25864..8c79ab4 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
@@ -38,6 +38,7 @@ using OpenMetaverse;
38using OpenSim.Framework; 38using OpenSim.Framework;
39using OpenSim.Framework.Communications; 39using OpenSim.Framework.Communications;
40using OpenSim.Region.CoreModules.Avatar.Attachments; 40using OpenSim.Region.CoreModules.Avatar.Attachments;
41using OpenSim.Region.CoreModules.Framework.InventoryAccess;
41using OpenSim.Region.CoreModules.World.Serialiser; 42using OpenSim.Region.CoreModules.World.Serialiser;
42using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation; 43using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation;
43using OpenSim.Region.Framework.Scenes; 44using OpenSim.Region.Framework.Scenes;
@@ -65,8 +66,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
65 // Don't allow tests to be bamboozled by asynchronous events. Execute everything on the same thread. 66 // Don't allow tests to be bamboozled by asynchronous events. Execute everything on the same thread.
66 Util.FireAndForgetMethod = FireAndForgetMethod.None; 67 Util.FireAndForgetMethod = FireAndForgetMethod.None;
67 68
68 scene = SceneHelpers.SetupScene("Neighbour x", UUID.Random(), 1000, 1000); 69 IConfigSource config = new IniConfigSource();
69 SceneHelpers.SetupSceneModules(scene, new AttachmentsModule()); 70 config.AddConfig("Modules");
71 config.Configs["Modules"].Set("InventoryAccessModule", "BasicInventoryAccessModule");
72
73 scene = SceneHelpers.SetupScene();
74 SceneHelpers.SetupSceneModules(scene, config, new AttachmentsModule(), new BasicInventoryAccessModule());
70 75
71 agent1 = UUID.Random(); 76 agent1 = UUID.Random();
72 random = new Random(); 77 random = new Random();
@@ -114,16 +119,21 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
114 TestHelpers.InMethod(); 119 TestHelpers.InMethod();
115// log4net.Config.XmlConfigurator.Configure(); 120// log4net.Config.XmlConfigurator.Configure();
116 121
117 UUID spId = TestHelpers.ParseTail(0x1); 122 UUID userId = TestHelpers.ParseTail(0x1);
118 UUID attItemId = TestHelpers.ParseTail(0x2); 123 UUID attItemId = TestHelpers.ParseTail(0x2);
119 UUID attAssetId = TestHelpers.ParseTail(0x3); 124 UUID attAssetId = TestHelpers.ParseTail(0x3);
120 125
121 AgentCircuitData acd = SceneHelpers.GenerateAgentData(spId); 126 UserAccountHelpers.CreateUserWithInventory(scene, userId);
127 InventoryItemBase attItem
128 = UserInventoryHelpers.CreateInventoryItem(
129 scene, "att", attItemId, attAssetId, userId, InventoryType.Object);
130
131 AgentCircuitData acd = SceneHelpers.GenerateAgentData(userId);
122 acd.Appearance = new AvatarAppearance(); 132 acd.Appearance = new AvatarAppearance();
123 acd.Appearance.SetAttachment((int)AttachmentPoint.Chest, attItemId, attAssetId); 133 acd.Appearance.SetAttachment((int)AttachmentPoint.Chest, attItem.ID, attItem.AssetID);
124 ScenePresence presence = SceneHelpers.AddScenePresence(scene, acd); 134 ScenePresence presence = SceneHelpers.AddScenePresence(scene, acd);
125 135
126// Assert.That(presence.HasAttachments(), Is.True); 136 Assert.That(presence.HasAttachments(), Is.True);
127 } 137 }
128 138
129 // I'm commenting this test because scene setup NEEDS InventoryService to 139 // I'm commenting this test because scene setup NEEDS InventoryService to
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index 4933147..65ba87b 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -964,8 +964,20 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
964 } 964 }
965 } 965 }
966 } 966 }
967 else
968 {
969 m_log.WarnFormat(
970 "[InventoryAccessModule]: Could not find asset {0} for item {1} {2} for {3} in RezObject()", item.AssetID, item.Name, item.ID, remoteClient.Name);
971 }
972
967 return group; 973 return group;
968 } 974 }
975 else
976 {
977 m_log.WarnFormat(
978 "[InventoryAccessModule]: Could not find item {0} for {1} in RezObject()",
979 itemID, remoteClient.Name);
980 }
969 981
970 return null; 982 return null;
971 } 983 }