From 5170cd75775eb85922783fa8afe4f8025c054189 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 21 Mar 2012 11:22:39 -0700 Subject: Updated the UserAccountsClient a little bit, plus some more sanity checks on the service connector. --- .../Clients/UserAccounts/UserAccountsClient.cs | 66 +++++++++++++++------- 1 file changed, 45 insertions(+), 21 deletions(-) (limited to 'OpenSim/Tests') diff --git a/OpenSim/Tests/Clients/UserAccounts/UserAccountsClient.cs b/OpenSim/Tests/Clients/UserAccounts/UserAccountsClient.cs index 56195b1..1e0a35b 100644 --- a/OpenSim/Tests/Clients/UserAccounts/UserAccountsClient.cs +++ b/OpenSim/Tests/Clients/UserAccounts/UserAccountsClient.cs @@ -62,25 +62,39 @@ namespace OpenSim.Tests.Clients.PresenceClient string last = "Clueless"; string email = "foo@bar.com"; - UserAccount account = new UserAccount(user1); - account.FirstName = first; - account.LastName = last; - account.Email = email; - account.ServiceURLs = new Dictionary(); - account.ServiceURLs.Add("InventoryServerURI", "http://cnn.com"); - account.ServiceURLs.Add("AssetServerURI", "http://cnn.com"); - - bool success = m_Connector.StoreUserAccount(account); - if (success) - m_log.InfoFormat("[USER CLIENT]: Successfully created account for user {0} {1}", account.FirstName, account.LastName); - else - m_log.InfoFormat("[USER CLIENT]: failed to create user {0} {1}", account.FirstName, account.LastName); + //UserAccount account = new UserAccount(user1); + //account.ScopeID = UUID.Zero; + //account.FirstName = first; + //account.LastName = last; + //account.Email = email; + //account.ServiceURLs = new Dictionary(); + //account.ServiceURLs.Add("InventoryServerURI", "http://cnn.com"); + //account.ServiceURLs.Add("AssetServerURI", "http://cnn.com"); - System.Console.WriteLine("\n"); + //bool success = m_Connector.StoreUserAccount(account); + //if (success) + // m_log.InfoFormat("[USER CLIENT]: Successfully created account for user {0} {1}", account.FirstName, account.LastName); + //else + // m_log.InfoFormat("[USER CLIENT]: failed to create user {0} {1}", account.FirstName, account.LastName); - account = m_Connector.GetUserAccount(UUID.Zero, user1); + //System.Console.WriteLine("\n"); + + //account = m_Connector.GetUserAccount(UUID.Zero, user1); + //if (account == null) + // m_log.InfoFormat("[USER CLIENT]: Unable to retrieve accouny by UUID for {0}", user1); + //else + //{ + // m_log.InfoFormat("[USER CLIENT]: Account retrieved correctly: userID={0}; FirstName={1}; LastName={2}; Email={3}", + // account.PrincipalID, account.FirstName, account.LastName, account.Email); + // foreach (KeyValuePair kvp in account.ServiceURLs) + // m_log.DebugFormat("\t {0} -> {1}", kvp.Key, kvp.Value); + //} + + //System.Console.WriteLine("\n"); + + UserAccount account = m_Connector.GetUserAccount(UUID.Zero, first, last); if (account == null) - m_log.InfoFormat("[USER CLIENT]: Unable to retrieve accouny by UUID for {0}", user1); + m_log.InfoFormat("[USER CLIENT]: Unable to retrieve accouny by name "); else { m_log.InfoFormat("[USER CLIENT]: Account retrieved correctly: userID={0}; FirstName={1}; LastName={2}; Email={3}", @@ -90,10 +104,9 @@ namespace OpenSim.Tests.Clients.PresenceClient } System.Console.WriteLine("\n"); - - account = m_Connector.GetUserAccount(UUID.Zero, first, last); + account = m_Connector.GetUserAccount(UUID.Zero, email); if (account == null) - m_log.InfoFormat("[USER CLIENT]: Unable to retrieve accouny by name for {0}", user1); + m_log.InfoFormat("[USER CLIENT]: Unable to retrieve accouny by email"); else { m_log.InfoFormat("[USER CLIENT]: Account retrieved correctly: userID={0}; FirstName={1}; LastName={2}; Email={3}", @@ -103,9 +116,9 @@ namespace OpenSim.Tests.Clients.PresenceClient } System.Console.WriteLine("\n"); - account = m_Connector.GetUserAccount(UUID.Zero, email); + account = m_Connector.GetUserAccount(UUID.Zero, user1); if (account == null) - m_log.InfoFormat("[USER CLIENT]: Unable to retrieve accouny by email for {0}", user1); + m_log.InfoFormat("[USER CLIENT]: Unable to retrieve accouny by UUID for {0}", user1); else { m_log.InfoFormat("[USER CLIENT]: Account retrieved correctly: userID={0}; FirstName={1}; LastName={2}; Email={3}", @@ -114,6 +127,17 @@ namespace OpenSim.Tests.Clients.PresenceClient m_log.DebugFormat("\t {0} -> {1}", kvp.Key, kvp.Value); } + System.Console.WriteLine("\n"); + account = m_Connector.GetUserAccount(UUID.Zero, "DoesNot", "Exist"); + if (account == null) + m_log.InfoFormat("[USER CLIENT]: Unable to retrieve account 'DoesNot Exist'"); + else + { + m_log.InfoFormat("[USER CLIENT]: Account 'DoesNot Exist' retrieved correctly. REALLY??? userID={0}; FirstName={1}; LastName={2}; Email={3}", + account.PrincipalID, account.FirstName, account.LastName, account.Email); + foreach (KeyValuePair kvp in account.ServiceURLs) + m_log.DebugFormat("\t {0} -> {1}", kvp.Key, kvp.Value); + } } } -- cgit v1.1 From 1a8769e6eff0eab750a528f27d127637edbd292b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 21 Mar 2012 23:57:39 +0000 Subject: Instead of loading default avatar animations in both SLUtil and AvatarAnimations, load just in AvatarAnimations instead. This lets us remove the dependency of OpenSim.Framework.dll on data/avataranimations.xml, which is not necessary for ROBUST. This commit also takes care of the odd situation where animations are stored and used internally with uppercase names (e.g. "STAND") but scripts refer to them with lowercase names (e.g. "sit"). --- OpenSim/Tests/Common/Mock/TestClient.cs | 5 ----- 1 file changed, 5 deletions(-) (limited to 'OpenSim/Tests') diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index 14c1287..455b51e 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs @@ -700,11 +700,6 @@ namespace OpenSim.Tests.Common.Mock { } - public UUID GetDefaultAnimation(string name) - { - return UUID.Zero; - } - public void SendTakeControls(int controls, bool passToAgent, bool TakeControls) { } -- cgit v1.1