aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs195
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs240
-rw-r--r--OpenSim/Server/Base/ServerUtils.cs7
-rw-r--r--OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs4
4 files changed, 225 insertions, 221 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
index 296d4c1..b979a35 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
@@ -66,135 +66,132 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
66 /// <summary> 66 /// <summary>
67 /// Test saving a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet). 67 /// Test saving a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet).
68 /// </summary> 68 /// </summary>
69// [Test] 69 //[Test]
70// public void TestSaveIarV0p1() 70 public void TestSaveIarV0p1()
71// { 71 {
72// TestHelper.InMethod(); 72 TestHelper.InMethod();
73// //log4net.Config.XmlConfigurator.Configure(); 73 //log4net.Config.XmlConfigurator.Configure();
74 74
75// InventoryArchiverModule archiverModule = new InventoryArchiverModule(); 75 InventoryArchiverModule archiverModule = new InventoryArchiverModule();
76 76
77// Scene scene = SceneSetupHelpers.SetupScene(false); 77 Scene scene = SceneSetupHelpers.SetupScene(false);
78// SceneSetupHelpers.SetupSceneModules(scene, archiverModule); 78 SceneSetupHelpers.SetupSceneModules(scene, archiverModule);
79// CommunicationsManager cm = scene.CommsManager; 79 CommunicationsManager cm = scene.CommsManager;
80 80
81// // Create user 81 // Create user
82// string userFirstName = "Jock"; 82 string userFirstName = "Jock";
83// string userLastName = "Stirrup"; 83 string userLastName = "Stirrup";
84// UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020"); 84 UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020");
85// cm.UserAdminService.AddUser(userFirstName, userLastName, string.Empty, string.Empty, 1000, 1000, userId); 85 cm.UserAdminService.AddUser(userFirstName, userLastName, string.Empty, string.Empty, 1000, 1000, userId);
86// CachedUserInfo userInfo = cm.UserProfileCacheService.GetUserDetails(userId); 86 CachedUserInfo userInfo = cm.UserProfileCacheService.GetUserDetails(userId);
87// userInfo.FetchInventory(); 87 userInfo.FetchInventory();
88 88
89// // Create asset 89 // Create asset
90// SceneObjectGroup object1; 90 SceneObjectGroup object1;
91// SceneObjectPart part1; 91 SceneObjectPart part1;
92// { 92 {
93// string partName = "My Little Dog Object"; 93 string partName = "My Little Dog Object";
94// UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); 94 UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040");
95// PrimitiveBaseShape shape = PrimitiveBaseShape.CreateSphere(); 95 PrimitiveBaseShape shape = PrimitiveBaseShape.CreateSphere();
96// Vector3 groupPosition = new Vector3(10, 20, 30); 96 Vector3 groupPosition = new Vector3(10, 20, 30);
97// Quaternion rotationOffset = new Quaternion(20, 30, 40, 50); 97 Quaternion rotationOffset = new Quaternion(20, 30, 40, 50);
98// Vector3 offsetPosition = new Vector3(5, 10, 15); 98 Vector3 offsetPosition = new Vector3(5, 10, 15);
99 99
100// part1 100 part1
101// = new SceneObjectPart( 101 = new SceneObjectPart(
102// ownerId, shape, groupPosition, rotationOffset, offsetPosition); 102 ownerId, shape, groupPosition, rotationOffset, offsetPosition);
103// part1.Name = partName; 103 part1.Name = partName;
104 104
105// object1 = new SceneObjectGroup(part1); 105 object1 = new SceneObjectGroup(part1);
106// scene.AddNewSceneObject(object1, false); 106 scene.AddNewSceneObject(object1, false);
107// } 107 }
108 108
109// UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); 109 UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060");
110// AssetBase asset1 = new AssetBase(); 110 AssetBase asset1 = new AssetBase();
111// asset1.FullID = asset1Id; 111 asset1.FullID = asset1Id;
112// asset1.Data = Encoding.ASCII.GetBytes(SceneObjectSerializer.ToXml2Format(object1)); 112 asset1.Data = Encoding.ASCII.GetBytes(SceneObjectSerializer.ToXml2Format(object1));
113// scene.AssetService.Store(asset1); 113 scene.AssetService.Store(asset1);
114 114
115// // Create item 115 // Create item
116// UUID item1Id = UUID.Parse("00000000-0000-0000-0000-000000000080"); 116 UUID item1Id = UUID.Parse("00000000-0000-0000-0000-000000000080");
117// InventoryItemBase item1 = new InventoryItemBase(); 117 InventoryItemBase item1 = new InventoryItemBase();
118// item1.Name = "My Little Dog"; 118 item1.Name = "My Little Dog";
119// item1.AssetID = asset1.FullID; 119 item1.AssetID = asset1.FullID;
120// item1.ID = item1Id; 120 item1.ID = item1Id;
121// item1.Folder = userInfo.RootFolder.FindFolderByPath("Objects").ID; 121 item1.Folder = userInfo.RootFolder.FindFolderByPath("Objects").ID;
122// scene.AddInventoryItem(userId, item1); 122 scene.AddInventoryItem(userId, item1);
123 123
124// MemoryStream archiveWriteStream = new MemoryStream(); 124 MemoryStream archiveWriteStream = new MemoryStream();
125// archiverModule.OnInventoryArchiveSaved += SaveCompleted; 125 archiverModule.OnInventoryArchiveSaved += SaveCompleted;
126 126
127// lock (this) 127 lock (this)
128// { 128 {
129// archiverModule.ArchiveInventory(userFirstName, userLastName, "Objects", archiveWriteStream); 129 archiverModule.ArchiveInventory(userFirstName, userLastName, "Objects", archiveWriteStream);
130// //AssetServerBase assetServer = (AssetServerBase)scene.CommsManager.AssetCache.AssetServer; 130 //AssetServerBase assetServer = (AssetServerBase)scene.CommsManager.AssetCache.AssetServer;
131// //while (assetServer.HasWaitingRequests()) 131 //while (assetServer.HasWaitingRequests())
132// // assetServer.ProcessNextRequest(); 132 // assetServer.ProcessNextRequest();
133 133
134// Monitor.Wait(this, 60000); 134 Monitor.Wait(this, 60000);
135// } 135 }
136 136
137// byte[] archive = archiveWriteStream.ToArray(); 137 byte[] archive = archiveWriteStream.ToArray();
138// MemoryStream archiveReadStream = new MemoryStream(archive); 138 MemoryStream archiveReadStream = new MemoryStream(archive);
139// TarArchiveReader tar = new TarArchiveReader(archiveReadStream); 139 TarArchiveReader tar = new TarArchiveReader(archiveReadStream);
140 140
141// InventoryFolderImpl objectsFolder = userInfo.RootFolder.FindFolderByPath("Objects"); 141 InventoryFolderImpl objectsFolder = userInfo.RootFolder.FindFolderByPath("Objects");
142 142
143// //bool gotControlFile = false; 143 //bool gotControlFile = false;
144// bool gotObject1File = false; 144 bool gotObject1File = false;
145// //bool gotObject2File = false; 145 //bool gotObject2File = false;
146// string expectedObject1FilePath = string.Format( 146 string expectedObject1FilePath = string.Format(
147// "{0}{1}/{2}_{3}.xml", 147 "{0}{1}/{2}_{3}.xml",
148// ArchiveConstants.INVENTORY_PATH, 148 ArchiveConstants.INVENTORY_PATH,
149// string.Format( 149 string.Format(
150// "Objects{0}{1}", ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR, objectsFolder.ID), 150 "Objects{0}{1}", ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR, objectsFolder.ID),
151// item1.Name, 151 item1.Name,
152// item1Id); 152 item1Id);
153 153
154///*
155// string expectedObject2FileName = string.Format( 154// string expectedObject2FileName = string.Format(
156// "{0}_{1:000}-{2:000}-{3:000}__{4}.xml", 155// "{0}_{1:000}-{2:000}-{3:000}__{4}.xml",
157// part2.Name, 156// part2.Name,
158// Math.Round(part2.GroupPosition.X), Math.Round(part2.GroupPosition.Y), Math.Round(part2.GroupPosition.Z), 157// Math.Round(part2.GroupPosition.X), Math.Round(part2.GroupPosition.Y), Math.Round(part2.GroupPosition.Z),
159// part2.UUID); 158// part2.UUID);
160// */
161 159
162// string filePath; 160 string filePath;
163// TarArchiveReader.TarEntryType tarEntryType; 161 TarArchiveReader.TarEntryType tarEntryType;
164 162
165// while (tar.ReadEntry(out filePath, out tarEntryType) != null) 163 while (tar.ReadEntry(out filePath, out tarEntryType) != null)
166// { 164 {
167// Console.WriteLine("Got {0}", filePath); 165 //Console.WriteLine("Got {0}", filePath);
168 166
169// /*
170// if (ArchiveConstants.CONTROL_FILE_PATH == filePath) 167// if (ArchiveConstants.CONTROL_FILE_PATH == filePath)
171// { 168// {
172// gotControlFile = true; 169// gotControlFile = true;
173// } 170// }
174// */ 171
175// if (filePath.StartsWith(ArchiveConstants.INVENTORY_PATH) && filePath.EndsWith(".xml")) 172 if (filePath.StartsWith(ArchiveConstants.INVENTORY_PATH) && filePath.EndsWith(".xml"))
176// { 173 {
177// //string fileName = filePath.Remove(0, "Objects/".Length); 174 string fileName = filePath.Remove(0, "Objects/".Length);
178 175
179// //if (fileName.StartsWith(part1.Name)) 176 if (fileName.StartsWith(part1.Name))
180// //{ 177 {
181// Assert.That(filePath, Is.EqualTo(expectedObject1FilePath)); 178 Assert.That(filePath, Is.EqualTo(expectedObject1FilePath));
182// gotObject1File = true; 179 gotObject1File = true;
183// //} 180 }
184// //else if (fileName.StartsWith(part2.Name)) 181// else if (fileName.StartsWith(part2.Name))
185// //{ 182// {
186// // Assert.That(fileName, Is.EqualTo(expectedObject2FileName)); 183// Assert.That(fileName, Is.EqualTo(expectedObject2FileName));
187// // gotObject2File = true; 184// gotObject2File = true;
188// //} 185// }
189// } 186 }
190// } 187 }
191 188
192// //Assert.That(gotControlFile, Is.True, "No control file in archive"); 189// Assert.That(gotControlFile, Is.True, "No control file in archive");
193// Assert.That(gotObject1File, Is.True, "No item1 file in archive"); 190 Assert.That(gotObject1File, Is.True, "No item1 file in archive");
194// //Assert.That(gotObject2File, Is.True, "No object2 file in archive"); 191// Assert.That(gotObject2File, Is.True, "No object2 file in archive");
195 192
196// // TODO: Test presence of more files and contents of files. 193 // TODO: Test presence of more files and contents of files.
197// } 194 }
198 195
199 /// <summary> 196 /// <summary>
200 /// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where 197 /// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
index 2ba94f7..9741399 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
@@ -74,129 +74,129 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
74 } 74 }
75 } 75 }
76 76
77 ///// <summary> 77 /// <summary>
78 ///// Test saving a V0.2 OpenSim Region Archive. 78 /// Test saving a V0.2 OpenSim Region Archive.
79 ///// </summary> 79 /// </summary>
80 //[Test] 80 [Test]
81 //public void TestSaveOarV0p2() 81 public void TestSaveOarV0p2()
82 //{ 82 {
83 // TestHelper.InMethod(); 83 TestHelper.InMethod();
84 // //log4net.Config.XmlConfigurator.Configure(); 84 log4net.Config.XmlConfigurator.Configure();
85 85
86 // ArchiverModule archiverModule = new ArchiverModule(); 86 ArchiverModule archiverModule = new ArchiverModule();
87 // SerialiserModule serialiserModule = new SerialiserModule(); 87 SerialiserModule serialiserModule = new SerialiserModule();
88 // TerrainModule terrainModule = new TerrainModule(); 88 TerrainModule terrainModule = new TerrainModule();
89 89
90 // Scene scene = SceneSetupHelpers.SetupScene(false); 90 Scene scene = SceneSetupHelpers.SetupScene(false);
91 // SceneSetupHelpers.SetupSceneModules(scene, archiverModule, serialiserModule, terrainModule); 91 SceneSetupHelpers.SetupSceneModules(scene, archiverModule, serialiserModule, terrainModule);
92 92
93 // SceneObjectPart part1; 93 SceneObjectPart part1;
94 94
95 // // Create and add prim 1 95 // Create and add prim 1
96 // { 96 {
97 // string partName = "My Little Pony"; 97 string partName = "My Little Pony";
98 // UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000015"); 98 UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000015");
99 // PrimitiveBaseShape shape = PrimitiveBaseShape.CreateSphere(); 99 PrimitiveBaseShape shape = PrimitiveBaseShape.CreateSphere();
100 // Vector3 groupPosition = new Vector3(10, 20, 30); 100 Vector3 groupPosition = new Vector3(10, 20, 30);
101 // Quaternion rotationOffset = new Quaternion(20, 30, 40, 50); 101 Quaternion rotationOffset = new Quaternion(20, 30, 40, 50);
102 // Vector3 offsetPosition = new Vector3(5, 10, 15); 102 Vector3 offsetPosition = new Vector3(5, 10, 15);
103 103
104 // part1 104 part1
105 // = new SceneObjectPart( 105 = new SceneObjectPart(
106 // ownerId, shape, groupPosition, rotationOffset, offsetPosition); 106 ownerId, shape, groupPosition, rotationOffset, offsetPosition);
107 // part1.Name = partName; 107 part1.Name = partName;
108 108
109 // scene.AddNewSceneObject(new SceneObjectGroup(part1), false); 109 scene.AddNewSceneObject(new SceneObjectGroup(part1), false);
110 // } 110 }
111 111
112 // SceneObjectPart part2; 112 SceneObjectPart part2;
113 113
114 // // Create and add prim 2 114 // Create and add prim 2
115 // { 115 {
116 // string partName = "Action Man"; 116 string partName = "Action Man";
117 // UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000016"); 117 UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000016");
118 // PrimitiveBaseShape shape = PrimitiveBaseShape.CreateCylinder(); 118 PrimitiveBaseShape shape = PrimitiveBaseShape.CreateCylinder();
119 // Vector3 groupPosition = new Vector3(90, 80, 70); 119 Vector3 groupPosition = new Vector3(90, 80, 70);
120 // Quaternion rotationOffset = new Quaternion(60, 70, 80, 90); 120 Quaternion rotationOffset = new Quaternion(60, 70, 80, 90);
121 // Vector3 offsetPosition = new Vector3(20, 25, 30); 121 Vector3 offsetPosition = new Vector3(20, 25, 30);
122 122
123 // part2 123 part2
124 // = new SceneObjectPart( 124 = new SceneObjectPart(
125 // ownerId, shape, groupPosition, rotationOffset, offsetPosition); 125 ownerId, shape, groupPosition, rotationOffset, offsetPosition);
126 // part2.Name = partName; 126 part2.Name = partName;
127 127
128 // scene.AddNewSceneObject(new SceneObjectGroup(part2), false); 128 scene.AddNewSceneObject(new SceneObjectGroup(part2), false);
129 // } 129 }
130 130
131 // MemoryStream archiveWriteStream = new MemoryStream(); 131 MemoryStream archiveWriteStream = new MemoryStream();
132 // scene.EventManager.OnOarFileSaved += SaveCompleted; 132 scene.EventManager.OnOarFileSaved += SaveCompleted;
133 133
134 // Guid requestId = new Guid("00000000-0000-0000-0000-808080808080"); 134 Guid requestId = new Guid("00000000-0000-0000-0000-808080808080");
135 135
136 // lock (this) 136 lock (this)
137 // { 137 {
138 // archiverModule.ArchiveRegion(archiveWriteStream, requestId); 138 archiverModule.ArchiveRegion(archiveWriteStream, requestId);
139 // //AssetServerBase assetServer = (AssetServerBase)scene.CommsManager.AssetCache.AssetServer; 139 //AssetServerBase assetServer = (AssetServerBase)scene.CommsManager.AssetCache.AssetServer;
140 // //while (assetServer.HasWaitingRequests()) 140 //while (assetServer.HasWaitingRequests())
141 // // assetServer.ProcessNextRequest(); 141 // assetServer.ProcessNextRequest();
142 142
143 // Monitor.Wait(this, 60000); 143 Monitor.Wait(this, 60000);
144 // } 144 }
145 145
146 // Assert.That(m_lastRequestId, Is.EqualTo(requestId)); 146 Assert.That(m_lastRequestId, Is.EqualTo(requestId));
147 147
148 // byte[] archive = archiveWriteStream.ToArray(); 148 byte[] archive = archiveWriteStream.ToArray();
149 // MemoryStream archiveReadStream = new MemoryStream(archive); 149 MemoryStream archiveReadStream = new MemoryStream(archive);
150 // TarArchiveReader tar = new TarArchiveReader(archiveReadStream); 150 TarArchiveReader tar = new TarArchiveReader(archiveReadStream);
151 151
152 // bool gotControlFile = false; 152 bool gotControlFile = false;
153 // bool gotObject1File = false; 153 bool gotObject1File = false;
154 // bool gotObject2File = false; 154 bool gotObject2File = false;
155 // string expectedObject1FileName = string.Format( 155 string expectedObject1FileName = string.Format(
156 // "{0}_{1:000}-{2:000}-{3:000}__{4}.xml", 156 "{0}_{1:000}-{2:000}-{3:000}__{4}.xml",
157 // part1.Name, 157 part1.Name,
158 // Math.Round(part1.GroupPosition.X), Math.Round(part1.GroupPosition.Y), Math.Round(part1.GroupPosition.Z), 158 Math.Round(part1.GroupPosition.X), Math.Round(part1.GroupPosition.Y), Math.Round(part1.GroupPosition.Z),
159 // part1.UUID); 159 part1.UUID);
160 // string expectedObject2FileName = string.Format( 160 string expectedObject2FileName = string.Format(
161 // "{0}_{1:000}-{2:000}-{3:000}__{4}.xml", 161 "{0}_{1:000}-{2:000}-{3:000}__{4}.xml",
162 // part2.Name, 162 part2.Name,
163 // Math.Round(part2.GroupPosition.X), Math.Round(part2.GroupPosition.Y), Math.Round(part2.GroupPosition.Z), 163 Math.Round(part2.GroupPosition.X), Math.Round(part2.GroupPosition.Y), Math.Round(part2.GroupPosition.Z),
164 // part2.UUID); 164 part2.UUID);
165 165
166 // string filePath; 166 string filePath;
167 // TarArchiveReader.TarEntryType tarEntryType; 167 TarArchiveReader.TarEntryType tarEntryType;
168 168
169 // while (tar.ReadEntry(out filePath, out tarEntryType) != null) 169 while (tar.ReadEntry(out filePath, out tarEntryType) != null)
170 // { 170 {
171 // if (ArchiveConstants.CONTROL_FILE_PATH == filePath) 171 if (ArchiveConstants.CONTROL_FILE_PATH == filePath)
172 // { 172 {
173 // gotControlFile = true; 173 gotControlFile = true;
174 // } 174 }
175 // else if (filePath.StartsWith(ArchiveConstants.OBJECTS_PATH)) 175 else if (filePath.StartsWith(ArchiveConstants.OBJECTS_PATH))
176 // { 176 {
177 // string fileName = filePath.Remove(0, ArchiveConstants.OBJECTS_PATH.Length); 177 string fileName = filePath.Remove(0, ArchiveConstants.OBJECTS_PATH.Length);
178 178
179 // if (fileName.StartsWith(part1.Name)) 179 if (fileName.StartsWith(part1.Name))
180 // { 180 {
181 // Assert.That(fileName, Is.EqualTo(expectedObject1FileName)); 181 Assert.That(fileName, Is.EqualTo(expectedObject1FileName));
182 // gotObject1File = true; 182 gotObject1File = true;
183 // } 183 }
184 // else if (fileName.StartsWith(part2.Name)) 184 else if (fileName.StartsWith(part2.Name))
185 // { 185 {
186 // Assert.That(fileName, Is.EqualTo(expectedObject2FileName)); 186 Assert.That(fileName, Is.EqualTo(expectedObject2FileName));
187 // gotObject2File = true; 187 gotObject2File = true;
188 // } 188 }
189 // } 189 }
190 // } 190 }
191 191
192 // Assert.That(gotControlFile, Is.True, "No control file in archive"); 192 Assert.That(gotControlFile, Is.True, "No control file in archive");
193 // Assert.That(gotObject1File, Is.True, "No object1 file in archive"); 193 Assert.That(gotObject1File, Is.True, "No object1 file in archive");
194 // Assert.That(gotObject2File, Is.True, "No object2 file in archive"); 194 Assert.That(gotObject2File, Is.True, "No object2 file in archive");
195 195
196 // // TODO: Test presence of more files and contents of files. 196 // TODO: Test presence of more files and contents of files.
197 // // Temporary 197 // Temporary
198 // Console.WriteLine("Successfully completed {0}", MethodBase.GetCurrentMethod()); 198 Console.WriteLine("Successfully completed {0}", MethodBase.GetCurrentMethod());
199 //} 199 }
200 200
201 /// <summary> 201 /// <summary>
202 /// Test loading a V0.2 OpenSim Region Archive. 202 /// Test loading a V0.2 OpenSim Region Archive.
diff --git a/OpenSim/Server/Base/ServerUtils.cs b/OpenSim/Server/Base/ServerUtils.cs
index ae0c3d4..d827b86 100644
--- a/OpenSim/Server/Base/ServerUtils.cs
+++ b/OpenSim/Server/Base/ServerUtils.cs
@@ -31,11 +31,14 @@ using System.Reflection;
31using System.Xml; 31using System.Xml;
32using System.Xml.Serialization; 32using System.Xml.Serialization;
33using System.Text; 33using System.Text;
34using log4net;
34 35
35namespace OpenSim.Server.Base 36namespace OpenSim.Server.Base
36{ 37{
37 public static class ServerUtils 38 public static class ServerUtils
38 { 39 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41
39 public static string SLAssetTypeToContentType(int assetType) 42 public static string SLAssetTypeToContentType(int assetType)
40 { 43 {
41 switch (assetType) 44 switch (assetType)
@@ -114,6 +117,9 @@ namespace OpenSim.Server.Base
114 117
115 try 118 try
116 { 119 {
120 //m_log.DebugFormat("[PLUGINS]: Loading plugins from {0}", System.IO.Directory.GetCurrentDirectory());
121 //m_log.DebugFormat("[PLUGINS]: Trying to load {0}", dllName);
122
117 Assembly pluginAssembly = Assembly.LoadFrom(dllName); 123 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
118 124
119 foreach (Type pluginType in pluginAssembly.GetTypes()) 125 foreach (Type pluginType in pluginAssembly.GetTypes())
@@ -141,6 +147,7 @@ namespace OpenSim.Server.Base
141 } 147 }
142 catch (Exception e) 148 catch (Exception e)
143 { 149 {
150 m_log.ErrorFormat("Error loading plugin from {0}, exception {1}", dllName, e);
144 return null; 151 return null;
145 } 152 }
146 } 153 }
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index 258c444..b64b840 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -131,11 +131,11 @@ namespace OpenSim.Tests.Common.Setup
131 config.AddConfig("AssetService"); 131 config.AddConfig("AssetService");
132 config.Configs["Modules"].Set("AssetServices", "LocalAssetServicesConnector"); 132 config.Configs["Modules"].Set("AssetServices", "LocalAssetServicesConnector");
133 config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Services.AssetService.dll:AssetService"); 133 config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Services.AssetService.dll:AssetService");
134 config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Data.Null.dll"); 134 config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
135 assetService.Initialise(config); 135 assetService.Initialise(config);
136 assetService.AddRegion(testScene); 136 assetService.AddRegion(testScene);
137 assetService.RegionLoaded(testScene); 137 assetService.RegionLoaded(testScene);
138 //testScene.RegisterModuleInterface<IAssetService>((IAssetService)assetService); 138 testScene.AddRegionModule(assetService.Name, assetService);
139 139
140 testScene.SetModuleInterfaces(); 140 testScene.SetModuleInterfaces();
141 141