From c644ab6a2c902c829a0dc88d08780a4411b4cd29 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 14 Apr 2011 20:21:44 +0100
Subject: Make scene object parts created by the test utils unit sized.
---
OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Tests')
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index 709dd78..eb08b62 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -472,10 +472,10 @@ namespace OpenSim.Tests.Common.Setup
///
///
public static SceneObjectPart CreateSceneObjectPart(string name, UUID id, UUID ownerId)
- {
+ {
return new SceneObjectPart(
ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
- { Name = name, UUID = id };
+ { Name = name, UUID = id, Scale = new Vector3(1, 1, 1) };
}
///
--
cgit v1.1
From 821e67fb950721c0bb8105318e41d7982cf986f2 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 14 Apr 2011 20:59:52 +0100
Subject: implement stub TestLoadCoalesecedItem(). Doesn't do what it's meant
to do yet.
---
OpenSim/Tests/Common/Setup/AssetHelpers.cs | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Tests')
diff --git a/OpenSim/Tests/Common/Setup/AssetHelpers.cs b/OpenSim/Tests/Common/Setup/AssetHelpers.cs
index af66d7f..971c6bc 100644
--- a/OpenSim/Tests/Common/Setup/AssetHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/AssetHelpers.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Tests.Common
AssetBase asset = CreateAsset(UUID.Random(), AssetType.Notecard, "hello", creatorId);
scene.AssetService.Store(asset);
return asset;
- }
+ }
///
/// Create an asset from the given scene object.
@@ -75,6 +75,20 @@ namespace OpenSim.Tests.Common
///
/// Create an asset from the given scene object.
///
+ ///
+ /// The hexadecimal last part of the UUID for the asset created. A UUID of the form "00000000-0000-0000-0000-{0:XD12}"
+ /// will be used.
+ ///
+ ///
+ ///
+ public static AssetBase CreateAsset(int assetUuidTail, CoalescedSceneObjects coa)
+ {
+ return CreateAsset(new UUID(string.Format("00000000-0000-0000-0000-{0:X12}", assetUuidTail)), coa);
+ }
+
+ ///
+ /// Create an asset from the given scene object.
+ ///
///
///
///
@@ -85,7 +99,7 @@ namespace OpenSim.Tests.Common
AssetType.Object,
Encoding.ASCII.GetBytes(CoalescedSceneObjectsSerializer.ToXml(coa)),
coa.CreatorId);
- }
+ }
///
/// Create an asset from the given data.
--
cgit v1.1
From a0d80140f2d0ad6dd63970a3a3d5c0da8320ae75 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 15 Apr 2011 00:42:06 +0100
Subject: Make all the objects in a coalescence reappears after being loaded
from an IAR. This still doesn't work proprerly since some required
textures/contained item assets might be missing.
From pure code inspection, it looks like the uuid gatherer may get most asset uuids because the scene object serializer naively pulls non-root parts from all contained scene objects into one mega-object. However, root part uuids may well still be missing, and there may be other odd artifacts from this bug.
It appears that storing the size of the coalescence and the offsets is redundant, since one can work out this information from the position data already in the scene object groups.
---
OpenSim/Tests/Common/Mock/MockAssetService.cs | 22 ++++++++++++++++++----
OpenSim/Tests/Common/Setup/AssetHelpers.cs | 7 +++++++
OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 7 +++++--
3 files changed, 30 insertions(+), 6 deletions(-)
(limited to 'OpenSim/Tests')
diff --git a/OpenSim/Tests/Common/Mock/MockAssetService.cs b/OpenSim/Tests/Common/Mock/MockAssetService.cs
index 4118308..9d7c5e2 100644
--- a/OpenSim/Tests/Common/Mock/MockAssetService.cs
+++ b/OpenSim/Tests/Common/Mock/MockAssetService.cs
@@ -54,13 +54,19 @@ namespace OpenSim.Tests.Common.Mock
public AssetBase Get(string id)
{
- m_log.DebugFormat("[MOCK ASSET SERVICE]: Getting asset with id {0}", id);
+// m_log.DebugFormat("[MOCK ASSET SERVICE]: Getting asset with id {0}", id);
AssetBase asset;
if (Assets.ContainsKey(id))
+ {
asset = Assets[id];
+// m_log.DebugFormat(
+// "[MOCK ASSET SERVICE]: Got asset {0} {1}, bytes {2}", asset.Name, asset.ID, asset.Data.Length);
+ }
else
- asset = null;
+ {
+ asset = null;
+ }
return asset;
}
@@ -77,7 +83,14 @@ namespace OpenSim.Tests.Common.Mock
public byte[] GetData(string id)
{
- throw new System.NotImplementedException();
+// m_log.DebugFormat("[MOCK ASSET SERVICE]: Requesting data for asset {0}", id);
+
+ AssetBase asset = Get(id);
+
+ if (asset == null)
+ return null;
+ else
+ return asset.Data;
}
public bool Get(string id, object sender, AssetRetrieved handler)
@@ -89,7 +102,8 @@ namespace OpenSim.Tests.Common.Mock
public string Store(AssetBase asset)
{
- m_log.DebugFormat("[MOCK ASSET SERVICE]: Storing asset {0}", asset.ID);
+// m_log.DebugFormat(
+// "[MOCK ASSET SERVICE]: Storing asset {0} {1}, bytes {2}", asset.Name, asset.ID, asset.Data.Length);
Assets[asset.ID] = asset;
diff --git a/OpenSim/Tests/Common/Setup/AssetHelpers.cs b/OpenSim/Tests/Common/Setup/AssetHelpers.cs
index 971c6bc..d572249 100644
--- a/OpenSim/Tests/Common/Setup/AssetHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/AssetHelpers.cs
@@ -30,6 +30,7 @@ using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Framework.Scenes.Serialization;
+using OpenSim.Services.Interfaces;
namespace OpenSim.Tests.Common
{
@@ -118,5 +119,11 @@ namespace OpenSim.Tests.Common
asset.Data = data;
return asset;
}
+
+ public static string ReadAssetAsString(IAssetService assetService, UUID uuid)
+ {
+ byte[] assetData = assetService.GetData(uuid.ToString());
+ return Encoding.ASCII.GetString(assetData);
+ }
}
}
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index eb08b62..837f4e2 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -168,14 +168,17 @@ namespace OpenSim.Tests.Common.Setup
{
LocalAssetServicesConnector assetService = new LocalAssetServicesConnector();
IConfigSource config = new IniConfigSource();
- config.AddConfig("Modules");
- config.AddConfig("AssetService");
+ config.AddConfig("Modules");
config.Configs["Modules"].Set("AssetServices", "LocalAssetServicesConnector");
+
+ config.AddConfig("AssetService");
if (real)
config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Services.AssetService.dll:AssetService");
else
config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:MockAssetService");
+
config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
+
assetService.Initialise(config);
assetService.AddRegion(testScene);
assetService.RegionLoaded(testScene);
--
cgit v1.1
From 79bd430e08b9e8612194d9b02504f8f4acd889f6 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 15 Apr 2011 01:10:26 +0100
Subject: Remove the mock inventory service for tests and just use the real one
all the time with an in-memory data plugin
---
OpenSim/Tests/Common/Mock/MockInventoryService.cs | 186 ----------------------
OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 19 +--
2 files changed, 6 insertions(+), 199 deletions(-)
delete mode 100644 OpenSim/Tests/Common/Mock/MockInventoryService.cs
(limited to 'OpenSim/Tests')
diff --git a/OpenSim/Tests/Common/Mock/MockInventoryService.cs b/OpenSim/Tests/Common/Mock/MockInventoryService.cs
deleted file mode 100644
index 4ac1078..0000000
--- a/OpenSim/Tests/Common/Mock/MockInventoryService.cs
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright (c) Contributors, http://opensimulator.org/
- * See CONTRIBUTORS.TXT for a full list of copyright holders.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the OpenSimulator Project nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using OpenSim.Framework;
-using OpenMetaverse;
-using OpenSim.Services.Interfaces;
-using Nini.Config;
-
-namespace OpenSim.Tests.Common.Mock
-{
- public class MockInventoryService : IInventoryService
- {
- public MockInventoryService() {}
-
- public MockInventoryService(IConfigSource config) {}
-
- ///
- ///
- ///
- ///
- ///
- public bool CreateUserInventory(UUID userId)
- {
- return false;
- }
-
- ///
- ///
- ///
- ///
- ///
- public List GetInventorySkeleton(UUID userId)
- {
- List folders = new List();
- InventoryFolderBase folder = new InventoryFolderBase();
- folder.ID = UUID.Random();
- folder.Owner = userId;
- folders.Add(folder);
- return folders;
- }
-
- public InventoryFolderBase GetRootFolder(UUID userID)
- {
- return new InventoryFolderBase();
- }
-
- public InventoryCollection GetFolderContent(UUID userID, UUID folderID)
- {
- return null;
- }
-
- public InventoryFolderBase GetFolderForType(UUID userID, AssetType type)
- {
- return null;
- }
-
- ///
- /// Returns a list of all the active gestures in a user's inventory.
- ///
- ///
- /// The of the user
- ///
- ///
- /// A flat list of the gesture items.
- ///
- public List GetActiveGestures(UUID userId)
- {
- return null;
- }
-
- public InventoryCollection GetUserInventory(UUID userID)
- {
- return null;
- }
-
- public void GetUserInventory(UUID userID, OpenSim.Services.Interfaces.InventoryReceiptCallback callback)
- {
- }
-
- public List GetFolderItems(UUID userID, UUID folderID)
- {
- return null;
- }
-
- public bool AddFolder(InventoryFolderBase folder)
- {
- return false;
- }
-
- public bool UpdateFolder(InventoryFolderBase folder)
- {
- return false;
- }
-
- public bool MoveFolder(InventoryFolderBase folder)
- {
- return false;
- }
-
- public bool DeleteFolders(UUID ownerID, List ids)
- {
- return false;
- }
-
- public bool PurgeFolder(InventoryFolderBase folder)
- {
- return false;
- }
-
- public bool AddItem(InventoryItemBase item)
- {
- return true;
- }
-
- public bool UpdateItem(InventoryItemBase item)
- {
- return false;
- }
-
- public bool MoveItems(UUID ownerID, List items)
- {
- return false;
- }
-
- public bool DeleteItems(UUID ownerID, List itemIDs)
- {
- return false;
- }
-
- public InventoryItemBase GetItem(InventoryItemBase item)
- {
- return null;
- }
-
- public InventoryFolderBase GetFolder(InventoryFolderBase folder)
- {
- return null;
- }
-
- public bool HasInventoryForUser(UUID userID)
- {
- return false;
- }
-
- public InventoryFolderBase RequestRootFolder(UUID userID)
- {
- InventoryFolderBase root = new InventoryFolderBase();
- root.ID = UUID.Random();
- root.Owner = userID;
- root.ParentID = UUID.Zero;
- return root;
- }
-
- public int GetAssetPermissions(UUID userID, UUID assetID)
- {
- return 1;
- }
- }
-}
\ No newline at end of file
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index 837f4e2..97d4ace 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -137,7 +137,7 @@ namespace OpenSim.Tests.Common.Setup
// For now, always started a 'real' authentication service
StartAuthenticationService(testScene, true);
- LocalInventoryServicesConnector inventoryService = StartInventoryService(testScene, realServices.Contains("inventory"));
+ LocalInventoryServicesConnector inventoryService = StartInventoryService(testScene);
StartGridService(testScene, true);
LocalUserAccountServicesConnector userAccountService = StartUserAccountService(testScene);
LocalPresenceServicesConnector presenceService = StartPresenceService(testScene);
@@ -208,24 +208,17 @@ namespace OpenSim.Tests.Common.Setup
//m_authenticationService = service;
}
- private static LocalInventoryServicesConnector StartInventoryService(Scene testScene, bool real)
+ private static LocalInventoryServicesConnector StartInventoryService(Scene testScene)
{
LocalInventoryServicesConnector inventoryService = new LocalInventoryServicesConnector();
- IConfigSource config = new IniConfigSource();
+
+ IConfigSource config = new IniConfigSource();
config.AddConfig("Modules");
config.AddConfig("InventoryService");
config.Configs["Modules"].Set("InventoryServices", "LocalInventoryServicesConnector");
-
- if (real)
- {
- config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Services.InventoryService.dll:InventoryService");
- }
- else
- {
- config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:MockInventoryService");
- }
-
+ config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Services.InventoryService.dll:InventoryService");
config.Configs["InventoryService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
+
inventoryService.Initialise(config);
inventoryService.AddRegion(testScene);
inventoryService.RegionLoaded(testScene);
--
cgit v1.1
From 54e885581989ddfaf525753ede12c4d4d797cba0 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 15 Apr 2011 01:23:26 +0100
Subject: remove mock asset service for tests in favour of always using the
real one
---
OpenSim/Tests/Common/Mock/MockAssetService.cs | 123 ------------------------
OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 14 +--
2 files changed, 5 insertions(+), 132 deletions(-)
delete mode 100644 OpenSim/Tests/Common/Mock/MockAssetService.cs
(limited to 'OpenSim/Tests')
diff --git a/OpenSim/Tests/Common/Mock/MockAssetService.cs b/OpenSim/Tests/Common/Mock/MockAssetService.cs
deleted file mode 100644
index 9d7c5e2..0000000
--- a/OpenSim/Tests/Common/Mock/MockAssetService.cs
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (c) Contributors, http://opensimulator.org/
- * See CONTRIBUTORS.TXT for a full list of copyright holders.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the OpenSimulator Project nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using System;
-using System.Collections.Generic;
-using System.Reflection;
-using log4net;
-using OpenMetaverse;
-using OpenSim.Framework;
-using OpenSim.Data;
-using OpenSim.Services.Interfaces;
-using Nini.Config;
-
-namespace OpenSim.Tests.Common.Mock
-{
- public class MockAssetService : IAssetService
- {
- private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-
- private readonly Dictionary Assets = new Dictionary();
-
- public MockAssetService() {}
-
- ///
- /// This constructor is required if the asset service is being created reflectively (which is the case in some
- /// tests).
- ///
- ///
- public MockAssetService(IConfigSource config) {}
-
- public AssetBase Get(string id)
- {
-// m_log.DebugFormat("[MOCK ASSET SERVICE]: Getting asset with id {0}", id);
-
- AssetBase asset;
- if (Assets.ContainsKey(id))
- {
- asset = Assets[id];
-// m_log.DebugFormat(
-// "[MOCK ASSET SERVICE]: Got asset {0} {1}, bytes {2}", asset.Name, asset.ID, asset.Data.Length);
- }
- else
- {
- asset = null;
- }
-
- return asset;
- }
-
- public AssetBase GetCached(string id)
- {
- return Get(id);
- }
-
- public AssetMetadata GetMetadata(string id)
- {
- throw new System.NotImplementedException();
- }
-
- public byte[] GetData(string id)
- {
-// m_log.DebugFormat("[MOCK ASSET SERVICE]: Requesting data for asset {0}", id);
-
- AssetBase asset = Get(id);
-
- if (asset == null)
- return null;
- else
- return asset.Data;
- }
-
- public bool Get(string id, object sender, AssetRetrieved handler)
- {
- handler(id, sender, Get(id));
-
- return true;
- }
-
- public string Store(AssetBase asset)
- {
-// m_log.DebugFormat(
-// "[MOCK ASSET SERVICE]: Storing asset {0} {1}, bytes {2}", asset.Name, asset.ID, asset.Data.Length);
-
- Assets[asset.ID] = asset;
-
- return asset.ID;
- }
-
- public bool UpdateContent(string id, byte[] data)
- {
- throw new System.NotImplementedException();
- }
-
- public bool Delete(string id)
- {
- throw new System.NotImplementedException();
- }
- }
-}
\ No newline at end of file
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index 97d4ace..484a97d 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -132,7 +132,7 @@ namespace OpenSim.Tests.Common.Setup
testScene.AddModule(godsModule.Name, godsModule);
realServices = realServices.ToLower();
- LocalAssetServicesConnector assetService = StartAssetService(testScene, realServices.Contains("asset"));
+ LocalAssetServicesConnector assetService = StartAssetService(testScene);
// For now, always started a 'real' authentication service
StartAuthenticationService(testScene, true);
@@ -164,19 +164,15 @@ namespace OpenSim.Tests.Common.Setup
return testScene;
}
- private static LocalAssetServicesConnector StartAssetService(Scene testScene, bool real)
+ private static LocalAssetServicesConnector StartAssetService(Scene testScene)
{
LocalAssetServicesConnector assetService = new LocalAssetServicesConnector();
IConfigSource config = new IniConfigSource();
- config.AddConfig("Modules");
- config.Configs["Modules"].Set("AssetServices", "LocalAssetServicesConnector");
+ config.AddConfig("Modules");
+ config.Configs["Modules"].Set("AssetServices", "LocalAssetServicesConnector");
config.AddConfig("AssetService");
- if (real)
- config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Services.AssetService.dll:AssetService");
- else
- config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:MockAssetService");
-
+ config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Services.AssetService.dll:AssetService");
config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
assetService.Initialise(config);
--
cgit v1.1
From ba73df39a3824a91ffc848d9b6dc2356d1b307cf Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 15 Apr 2011 01:26:07 +0100
Subject: remove any reference to a mock authentication service since it
doesn't exist and we don't use it
---
OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
(limited to 'OpenSim/Tests')
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index 484a97d..b819581 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -132,11 +132,8 @@ namespace OpenSim.Tests.Common.Setup
testScene.AddModule(godsModule.Name, godsModule);
realServices = realServices.ToLower();
- LocalAssetServicesConnector assetService = StartAssetService(testScene);
-
- // For now, always started a 'real' authentication service
- StartAuthenticationService(testScene, true);
-
+ LocalAssetServicesConnector assetService = StartAssetService(testScene);
+ StartAuthenticationService(testScene);
LocalInventoryServicesConnector inventoryService = StartInventoryService(testScene);
StartGridService(testScene, true);
LocalUserAccountServicesConnector userAccountService = StartUserAccountService(testScene);
@@ -183,20 +180,18 @@ namespace OpenSim.Tests.Common.Setup
return assetService;
}
- private static void StartAuthenticationService(Scene testScene, bool real)
+ private static void StartAuthenticationService(Scene testScene)
{
ISharedRegionModule service = new LocalAuthenticationServicesConnector();
IConfigSource config = new IniConfigSource();
+
config.AddConfig("Modules");
config.AddConfig("AuthenticationService");
config.Configs["Modules"].Set("AuthenticationServices", "LocalAuthenticationServicesConnector");
- if (real)
- config.Configs["AuthenticationService"].Set(
- "LocalServiceModule", "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService");
- else
- config.Configs["AuthenticationService"].Set(
- "LocalServiceModule", "OpenSim.Tests.Common.dll:MockAuthenticationService");
+ config.Configs["AuthenticationService"].Set(
+ "LocalServiceModule", "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService");
config.Configs["AuthenticationService"].Set("StorageProvider", "OpenSim.Data.Null.dll");
+
service.Initialise(config);
service.AddRegion(testScene);
service.RegionLoaded(testScene);
--
cgit v1.1
From 631654a38d2ace833f8cd2dc3b6b3860352f8b13 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 15 Apr 2011 01:30:49 +0100
Subject: remove old code for a mock grid service, which got removed some time
back
---
OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Tests')
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index b819581..5d08764 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -135,7 +135,7 @@ namespace OpenSim.Tests.Common.Setup
LocalAssetServicesConnector assetService = StartAssetService(testScene);
StartAuthenticationService(testScene);
LocalInventoryServicesConnector inventoryService = StartInventoryService(testScene);
- StartGridService(testScene, true);
+ StartGridService(testScene);
LocalUserAccountServicesConnector userAccountService = StartUserAccountService(testScene);
LocalPresenceServicesConnector presenceService = StartPresenceService(testScene);
@@ -218,24 +218,19 @@ namespace OpenSim.Tests.Common.Setup
return inventoryService;
}
- private static LocalGridServicesConnector StartGridService(Scene testScene, bool real)
+ private static LocalGridServicesConnector StartGridService(Scene testScene)
{
IConfigSource config = new IniConfigSource();
config.AddConfig("Modules");
config.AddConfig("GridService");
config.Configs["Modules"].Set("GridServices", "LocalGridServicesConnector");
config.Configs["GridService"].Set("StorageProvider", "OpenSim.Data.Null.dll:NullRegionData");
- if (real)
- config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Services.GridService.dll:GridService");
+ config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Services.GridService.dll:GridService");
LocalGridServicesConnector gridService = new LocalGridServicesConnector();
gridService.Initialise(config);
-
- //else
- // config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:TestGridService");
gridService.AddRegion(testScene);
gridService.RegionLoaded(testScene);
- //testScene.AddRegionModule(m_gridService.Name, m_gridService);
return gridService;
}
--
cgit v1.1
From 66a62678e5da89b0fa004eca3a370d202c239884 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 15 Apr 2011 01:37:27 +0100
Subject: get rid of all traces of the now used mock service infrastructure
---
OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 32 ++-----------------------
1 file changed, 2 insertions(+), 30 deletions(-)
(limited to 'OpenSim/Tests')
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index 5d08764..99517d2 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -66,32 +66,7 @@ namespace OpenSim.Tests.Common.Setup
///
public static TestScene SetupScene()
{
- return SetupScene("");
- }
-
- ///
- /// Set up a test scene
- ///
- ///
- /// Starts real inventory and asset services, as opposed to mock ones, if true
- ///
- public static TestScene SetupScene(String realServices)
- {
- return SetupScene("Unit test region", UUID.Random(), 1000, 1000, realServices);
- }
-
- ///
- /// Set up a test scene
- ///
- /// Name of the region
- /// ID of the region
- /// X co-ordinate of the region
- /// Y co-ordinate of the region
- /// This should be the same if simulating two scenes within a standalone
- ///
- public static TestScene SetupScene(string name, UUID id, uint x, uint y)
- {
- return SetupScene(name, id, x, y, "");
+ return SetupScene("Unit test region", UUID.Random(), 1000, 1000);
}
///
@@ -103,10 +78,8 @@ namespace OpenSim.Tests.Common.Setup
/// X co-ordinate of the region
/// Y co-ordinate of the region
/// This should be the same if simulating two scenes within a standalone
- /// Starts real inventory and asset services, as opposed to mock ones, if true
///
- public static TestScene SetupScene(
- string name, UUID id, uint x, uint y, String realServices)
+ public static TestScene SetupScene(string name, UUID id, uint x, uint y)
{
Console.WriteLine("Setting up test scene {0}", name);
@@ -130,7 +103,6 @@ namespace OpenSim.Tests.Common.Setup
IRegionModule godsModule = new GodsModule();
godsModule.Initialise(testScene, new IniConfigSource());
testScene.AddModule(godsModule.Name, godsModule);
- realServices = realServices.ToLower();
LocalAssetServicesConnector assetService = StartAssetService(testScene);
StartAuthenticationService(testScene);
--
cgit v1.1