From b63405c1a796b44b58081857d01f726372467628 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Fri, 8 Jan 2010 10:43:34 -0800
Subject: Inching ahead... This compiles, but very likely does not run.
---
OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 2 --
1 file changed, 2 deletions(-)
(limited to 'OpenSim/Tests/Common/Setup')
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index b13e8dd..dbb8fd4 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -194,8 +194,6 @@ namespace OpenSim.Tests.Common.Setup
m_inventoryService.PostInitialise();
m_assetService.PostInitialise();
- testScene.CommsManager.UserService.SetInventoryService(testScene.InventoryService);
-
testScene.SetModuleInterfaces();
testScene.LandChannel = new TestLandChannel(testScene);
--
cgit v1.1
From 1e1b2ab221851efc414678b7ea52ef2ca788ce9f Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 10 Jan 2010 10:40:07 -0800
Subject: * OMG! All but one references to UserProfileCacheService have been
rerouted! * HG is seriously broken here * Compiles. Untested.
---
OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs | 147 +++++++++++----------
1 file changed, 75 insertions(+), 72 deletions(-)
(limited to 'OpenSim/Tests/Common/Setup')
diff --git a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs
index cb76bc1..b54299b 100644
--- a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs
+++ b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs
@@ -37,82 +37,85 @@ namespace OpenSim.Tests.Common.Setup
///
public static class UserProfileTestUtils
{
- ///
- /// Create a test user with a standard inventory
- ///
- ///
- ///
- /// Callback to invoke when inventory has been loaded. This is required because
- /// loading may be asynchronous, even on standalone
- ///
- ///
- public static CachedUserInfo CreateUserWithInventory(
- CommunicationsManager commsManager, OnInventoryReceivedDelegate callback)
- {
- UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000099");
- return CreateUserWithInventory(commsManager, userId, callback);
- }
+ // REFACTORING PROBLEM
+ // This needs to be rewritten
+
+ /////
+ ///// Create a test user with a standard inventory
+ /////
+ /////
+ /////
+ ///// Callback to invoke when inventory has been loaded. This is required because
+ ///// loading may be asynchronous, even on standalone
+ /////
+ /////
+ //public static CachedUserInfo CreateUserWithInventory(
+ // CommunicationsManager commsManager, OnInventoryReceivedDelegate callback)
+ //{
+ // UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000099");
+ // return CreateUserWithInventory(commsManager, userId, callback);
+ //}
- ///
- /// Create a test user with a standard inventory
- ///
- ///
- /// User ID
- ///
- /// Callback to invoke when inventory has been loaded. This is required because
- /// loading may be asynchronous, even on standalone
- ///
- ///
- public static CachedUserInfo CreateUserWithInventory(
- CommunicationsManager commsManager, UUID userId, OnInventoryReceivedDelegate callback)
- {
- return CreateUserWithInventory(commsManager, "Bill", "Bailey", userId, callback);
- }
+ /////
+ ///// Create a test user with a standard inventory
+ /////
+ /////
+ ///// User ID
+ /////
+ ///// Callback to invoke when inventory has been loaded. This is required because
+ ///// loading may be asynchronous, even on standalone
+ /////
+ /////
+ //public static CachedUserInfo CreateUserWithInventory(
+ // CommunicationsManager commsManager, UUID userId, OnInventoryReceivedDelegate callback)
+ //{
+ // return CreateUserWithInventory(commsManager, "Bill", "Bailey", userId, callback);
+ //}
- ///
- /// Create a test user with a standard inventory
- ///
- ///
- /// First name of user
- /// Last name of user
- /// User ID
- ///
- /// Callback to invoke when inventory has been loaded. This is required because
- /// loading may be asynchronous, even on standalone
- ///
- ///
- public static CachedUserInfo CreateUserWithInventory(
- CommunicationsManager commsManager, string firstName, string lastName,
- UUID userId, OnInventoryReceivedDelegate callback)
- {
- return CreateUserWithInventory(commsManager, firstName, lastName, "troll", userId, callback);
- }
+ /////
+ ///// Create a test user with a standard inventory
+ /////
+ /////
+ ///// First name of user
+ ///// Last name of user
+ ///// User ID
+ /////
+ ///// Callback to invoke when inventory has been loaded. This is required because
+ ///// loading may be asynchronous, even on standalone
+ /////
+ /////
+ //public static CachedUserInfo CreateUserWithInventory(
+ // CommunicationsManager commsManager, string firstName, string lastName,
+ // UUID userId, OnInventoryReceivedDelegate callback)
+ //{
+ // return CreateUserWithInventory(commsManager, firstName, lastName, "troll", userId, callback);
+ //}
- ///
- /// Create a test user with a standard inventory
- ///
- ///
- /// First name of user
- /// Last name of user
- /// Password
- /// User ID
- ///
- /// Callback to invoke when inventory has been loaded. This is required because
- /// loading may be asynchronous, even on standalone
- ///
- ///
- public static CachedUserInfo CreateUserWithInventory(
- CommunicationsManager commsManager, string firstName, string lastName, string password,
- UUID userId, OnInventoryReceivedDelegate callback)
- {
- LocalUserServices lus = (LocalUserServices)commsManager.UserService;
- lus.AddUser(firstName, lastName, password, "bill@bailey.com", 1000, 1000, userId);
+ /////
+ ///// Create a test user with a standard inventory
+ /////
+ /////
+ ///// First name of user
+ ///// Last name of user
+ ///// Password
+ ///// User ID
+ /////
+ ///// Callback to invoke when inventory has been loaded. This is required because
+ ///// loading may be asynchronous, even on standalone
+ /////
+ /////
+ //public static CachedUserInfo CreateUserWithInventory(
+ // CommunicationsManager commsManager, string firstName, string lastName, string password,
+ // UUID userId, OnInventoryReceivedDelegate callback)
+ //{
+ // LocalUserServices lus = (LocalUserServices)commsManager.UserService;
+ // lus.AddUser(firstName, lastName, password, "bill@bailey.com", 1000, 1000, userId);
- CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(userId);
- userInfo.OnInventoryReceived += callback;
- userInfo.FetchInventory();
+ // CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(userId);
+ // userInfo.OnInventoryReceived += callback;
+ // userInfo.FetchInventory();
- return userInfo;
- }
+ // return userInfo;
+ //}
}
}
--
cgit v1.1
From 751e70af788bf27fa0401c25d899f73186c8eafa Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 10 Jan 2010 21:37:36 -0800
Subject: NetworkServersInfo removed from CommsManager.
---
OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs | 1 -
1 file changed, 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Setup')
diff --git a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs
index b54299b..24ad3eb 100644
--- a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs
+++ b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs
@@ -28,7 +28,6 @@
using OpenMetaverse;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Cache;
-using OpenSim.Region.Communications.Local;
namespace OpenSim.Tests.Common.Setup
{
--
cgit v1.1
From 001d3695683d9511446d194feeb763c437170028 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 11 Jan 2010 07:45:47 -0800
Subject: CommunicationsManager deleted.
---
OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 64 +++++++++++++------------
1 file changed, 33 insertions(+), 31 deletions(-)
(limited to 'OpenSim/Tests/Common/Setup')
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index dbb8fd4..f6c9f3b 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -60,7 +60,6 @@ namespace OpenSim.Tests.Common.Setup
private static ISharedRegionModule m_assetService = null;
private static ISharedRegionModule m_inventoryService = null;
private static ISharedRegionModule m_gridService = null;
- private static TestCommunicationsManager commsManager = null;
///
/// Set up a test scene
@@ -83,21 +82,23 @@ namespace OpenSim.Tests.Common.Setup
public static TestScene SetupScene(String realServices)
{
return SetupScene(
- "Unit test region", UUID.Random(), 1000, 1000, new TestCommunicationsManager(), realServices);
+ "Unit test region", UUID.Random(), 1000, 1000, realServices);
}
- ///
- /// Set up a test scene
- ///
- ///
- /// Starts real inventory and asset services, as opposed to mock ones, if true
- /// This should be the same if simulating two scenes within a standalone
- ///
- public static TestScene SetupScene(TestCommunicationsManager cm, String realServices)
- {
- return SetupScene(
- "Unit test region", UUID.Random(), 1000, 1000, cm, "");
- }
+ // REFACTORING PROBLEM. No idea what the difference is with the previous one
+ /////
+ ///// Set up a test scene
+ /////
+ /////
+ ///// Starts real inventory and asset services, as opposed to mock ones, if true
+ ///// This should be the same if simulating two scenes within a standalone
+ /////
+ //public static TestScene SetupScene(String realServices)
+ //{
+ // return SetupScene(
+ // "Unit test region", UUID.Random(), 1000, 1000, "");
+ //}
+
///
/// Set up a test scene
///
@@ -107,9 +108,9 @@ namespace OpenSim.Tests.Common.Setup
/// 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, TestCommunicationsManager cm)
+ public static TestScene SetupScene(string name, UUID id, uint x, uint y)
{
- return SetupScene(name, id, x, y, cm, "");
+ return SetupScene(name, id, x, y,"");
}
@@ -125,23 +126,24 @@ namespace OpenSim.Tests.Common.Setup
/// 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, TestCommunicationsManager cm, String realServices)
+ string name, UUID id, uint x, uint y, String realServices)
{
bool newScene = false;
Console.WriteLine("Setting up test scene {0}", name);
-
- // If cm is the same as our last commsManager used, this means the tester wants to link
- // regions. In this case, don't use the sameshared region modules and dont initialize them again.
- // Also, no need to start another MainServer and MainConsole instance.
- if (cm == null || cm != commsManager)
- {
- System.Console.WriteLine("Starting a brand new scene");
- newScene = true;
- MainConsole.Instance = new LocalConsole("TEST PROMPT");
- MainServer.Instance = new BaseHttpServer(980);
- commsManager = cm;
- }
+
+ // REFACTORING PROBLEM!
+ //// If cm is the same as our last commsManager used, this means the tester wants to link
+ //// regions. In this case, don't use the sameshared region modules and dont initialize them again.
+ //// Also, no need to start another MainServer and MainConsole instance.
+ //if (cm == null || cm != commsManager)
+ //{
+ // System.Console.WriteLine("Starting a brand new scene");
+ // newScene = true;
+ // MainConsole.Instance = new LocalConsole("TEST PROMPT");
+ // MainServer.Instance = new BaseHttpServer(980);
+ // commsManager = cm;
+ //}
// We must set up a console otherwise setup of some modules may fail
RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1");
@@ -149,13 +151,13 @@ namespace OpenSim.Tests.Common.Setup
regInfo.RegionID = id;
AgentCircuitManager acm = new AgentCircuitManager();
- SceneCommunicationService scs = new SceneCommunicationService(cm);
+ SceneCommunicationService scs = new SceneCommunicationService();
StorageManager sm = new StorageManager("OpenSim.Data.Null.dll", "", "");
IConfigSource configSource = new IniConfigSource();
TestScene testScene = new TestScene(
- regInfo, acm, cm, scs, sm, null, false, false, false, configSource, null);
+ regInfo, acm, scs, sm, null, false, false, false, configSource, null);
INonSharedRegionModule capsModule = new CapabilitiesModule();
capsModule.Initialise(new IniConfigSource());
--
cgit v1.1
From c5ea783526611a968400a1936e4c6764ee1c7013 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 11 Jan 2010 07:51:33 -0800
Subject: OpenSim/Framework/Communications/Cache deleted. LibraryRootFolder
deleted.
---
OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 2 +-
OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Tests/Common/Setup')
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index f6c9f3b..e37e137 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -32,7 +32,7 @@ using Nini.Config;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Communications;
-using OpenSim.Framework.Communications.Cache;
+
using OpenSim.Framework.Console;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Servers.HttpServer;
diff --git a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs
index 24ad3eb..cd61fa6 100644
--- a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs
+++ b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs
@@ -27,7 +27,7 @@
using OpenMetaverse;
using OpenSim.Framework.Communications;
-using OpenSim.Framework.Communications.Cache;
+
namespace OpenSim.Tests.Common.Setup
{
--
cgit v1.1
From 2e7aa387f7a705079df4b534978c0f134591eea9 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 21 Feb 2010 19:11:48 -0800
Subject: One more test running.
---
OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 26 +++++++++++++++++++++++++
1 file changed, 26 insertions(+)
(limited to 'OpenSim/Tests/Common/Setup')
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index e37e137..9e718f6 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -45,6 +45,7 @@ using OpenSim.Region.CoreModules.Avatar.Gods;
using OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset;
using OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory;
using OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid;
+using OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts;
using OpenSim.Services.Interfaces;
using OpenSim.Tests.Common.Mock;
@@ -60,6 +61,7 @@ namespace OpenSim.Tests.Common.Setup
private static ISharedRegionModule m_assetService = null;
private static ISharedRegionModule m_inventoryService = null;
private static ISharedRegionModule m_gridService = null;
+ private static ISharedRegionModule m_userAccountService = null;
///
/// Set up a test scene
@@ -183,6 +185,8 @@ namespace OpenSim.Tests.Common.Setup
StartInventoryService(testScene, false);
if (realServices.Contains("grid"))
StartGridService(testScene, true);
+ if (realServices.Contains("useraccounts"))
+ StartUserAccountService(testScene, true);
}
// If not, make sure the shared module gets references to this new scene
@@ -269,6 +273,28 @@ namespace OpenSim.Tests.Common.Setup
//testScene.AddRegionModule(m_gridService.Name, m_gridService);
}
+ private static void StartUserAccountService(Scene testScene, bool real)
+ {
+ IConfigSource config = new IniConfigSource();
+ config.AddConfig("Modules");
+ config.AddConfig("UserAccountService");
+ config.Configs["Modules"].Set("UserAccountServices", "LocalUserAccountServicesConnector");
+ config.Configs["UserAccountService"].Set("StorageProvider", "OpenSim.Data.Null.dll");
+ if (real)
+ config.Configs["UserAccountService"].Set("LocalServiceModule", "OpenSim.Services.UserAccountService.dll:UserAccountService");
+ if (m_userAccountService == null)
+ {
+ ISharedRegionModule userAccountService = new LocalUserAccountServicesConnector();
+ userAccountService.Initialise(config);
+ m_userAccountService = userAccountService;
+ }
+ //else
+ // config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:TestGridService");
+ m_userAccountService.AddRegion(testScene);
+ m_userAccountService.RegionLoaded(testScene);
+ //testScene.AddRegionModule(m_gridService.Name, m_gridService);
+ }
+
///
/// Setup modules for a scene using their default settings.
--
cgit v1.1
From 7665aad002ef066fc31fa9497225d2668641c769 Mon Sep 17 00:00:00 2001
From: John Hurliman
Date: Mon, 22 Feb 2010 13:27:17 -0800
Subject: * Adds CreatorID to asset metadata. This is just the plumbing to
support CreatorID, it doesn't modify database backends or OAR files to
support storing/loading it
---
OpenSim/Tests/Common/Setup/AssetHelpers.cs | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
(limited to 'OpenSim/Tests/Common/Setup')
diff --git a/OpenSim/Tests/Common/Setup/AssetHelpers.cs b/OpenSim/Tests/Common/Setup/AssetHelpers.cs
index 1188b62..98de514 100644
--- a/OpenSim/Tests/Common/Setup/AssetHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/AssetHelpers.cs
@@ -38,12 +38,9 @@ namespace OpenSim.Tests.Common
///
/// Create an asset from the given data
///
- ///
- ///
- ///
- public static AssetBase CreateAsset(UUID assetUuid, string data)
+ public static AssetBase CreateAsset(UUID assetUuid, string data, UUID creatorID)
{
- AssetBase asset = new AssetBase(assetUuid, assetUuid.ToString(), (sbyte)AssetType.Object);
+ AssetBase asset = new AssetBase(assetUuid, assetUuid.ToString(), (sbyte)AssetType.Object, creatorID);
asset.Data = Encoding.ASCII.GetBytes(data);
return asset;
}
@@ -56,7 +53,7 @@ namespace OpenSim.Tests.Common
///
public static AssetBase CreateAsset(UUID assetUuid, SceneObjectGroup sog)
{
- AssetBase asset = new AssetBase(assetUuid, assetUuid.ToString(), (sbyte)AssetType.Object);
+ AssetBase asset = new AssetBase(assetUuid, assetUuid.ToString(), (sbyte)AssetType.Object, sog.OwnerID);
asset.Data = Encoding.ASCII.GetBytes(SceneObjectSerializer.ToXml2Format(sog));
return asset;
}
--
cgit v1.1
From df76e95aa2dc9f3f3a0c546761b7624adc183ed0 Mon Sep 17 00:00:00 2001
From: John Hurliman
Date: Mon, 22 Feb 2010 14:18:59 -0800
Subject: Changed asset CreatorID to a string
---
OpenSim/Tests/Common/Setup/AssetHelpers.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Tests/Common/Setup')
diff --git a/OpenSim/Tests/Common/Setup/AssetHelpers.cs b/OpenSim/Tests/Common/Setup/AssetHelpers.cs
index 98de514..1fc3cb5 100644
--- a/OpenSim/Tests/Common/Setup/AssetHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/AssetHelpers.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Tests.Common
///
public static AssetBase CreateAsset(UUID assetUuid, string data, UUID creatorID)
{
- AssetBase asset = new AssetBase(assetUuid, assetUuid.ToString(), (sbyte)AssetType.Object, creatorID);
+ AssetBase asset = new AssetBase(assetUuid, assetUuid.ToString(), (sbyte)AssetType.Object, creatorID.ToString());
asset.Data = Encoding.ASCII.GetBytes(data);
return asset;
}
@@ -53,7 +53,7 @@ namespace OpenSim.Tests.Common
///
public static AssetBase CreateAsset(UUID assetUuid, SceneObjectGroup sog)
{
- AssetBase asset = new AssetBase(assetUuid, assetUuid.ToString(), (sbyte)AssetType.Object, sog.OwnerID);
+ AssetBase asset = new AssetBase(assetUuid, assetUuid.ToString(), (sbyte)AssetType.Object, sog.OwnerID.ToString());
asset.Data = Encoding.ASCII.GetBytes(SceneObjectSerializer.ToXml2Format(sog));
return asset;
}
--
cgit v1.1