diff options
author | Diva Canto | 2015-05-10 21:49:24 -0700 |
---|---|---|
committer | Diva Canto | 2015-05-10 21:49:24 -0700 |
commit | eb9b16d2849de438f20bb269ef3ea93e33f4d18d (patch) | |
tree | 928b4b92efa3d7fc42fd431fecdd0fa5895bbebb | |
parent | Added this form that comes handy for testing the grid service in Robust. (diff) | |
download | opensim-SC_OLD-eb9b16d2849de438f20bb269ef3ea93e33f4d18d.zip opensim-SC_OLD-eb9b16d2849de438f20bb269ef3ea93e33f4d18d.tar.gz opensim-SC_OLD-eb9b16d2849de438f20bb269ef3ea93e33f4d18d.tar.bz2 opensim-SC_OLD-eb9b16d2849de438f20bb269ef3ea93e33f4d18d.tar.xz |
Added simple test for IM in Robust too.
Changed Inventory data to use the mock one in Common Tests. (but still not inventory tests)
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/HypergridService/HGInstantMessageService.cs | 9 | ||||
-rw-r--r-- | OpenSim/Tests/Robust/Clients/InstantMessage/IMClient.cs (renamed from OpenSim/Tests/Clients/InstantMessage/IMClient.cs) | 31 | ||||
-rw-r--r-- | bin/Robust.Tests.ini | 58 |
3 files changed, 30 insertions, 68 deletions
diff --git a/OpenSim/Services/HypergridService/HGInstantMessageService.cs b/OpenSim/Services/HypergridService/HGInstantMessageService.cs index 9b7b278..dde0e6c 100644 --- a/OpenSim/Services/HypergridService/HGInstantMessageService.cs +++ b/OpenSim/Services/HypergridService/HGInstantMessageService.cs | |||
@@ -101,7 +101,14 @@ namespace OpenSim.Services.HypergridService | |||
101 | Object[] args = new Object[] { config }; | 101 | Object[] args = new Object[] { config }; |
102 | m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args); | 102 | m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args); |
103 | m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args); | 103 | m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args); |
104 | m_UserAgentService = ServerUtils.LoadPlugin<IUserAgentService>(userAgentService, args); | 104 | try |
105 | { | ||
106 | m_UserAgentService = ServerUtils.LoadPlugin<IUserAgentService>(userAgentService, args); | ||
107 | } | ||
108 | catch (Exception e) | ||
109 | { | ||
110 | m_log.WarnFormat("[HG IM SERVICE]: Unable to create User Agent Service. Missing config var in [HGInstantMessageService]?"); | ||
111 | } | ||
105 | 112 | ||
106 | m_RegionCache = new ExpiringCache<UUID, GridRegion>(); | 113 | m_RegionCache = new ExpiringCache<UUID, GridRegion>(); |
107 | 114 | ||
diff --git a/OpenSim/Tests/Clients/InstantMessage/IMClient.cs b/OpenSim/Tests/Robust/Clients/InstantMessage/IMClient.cs index e7304a2..8f312eb 100644 --- a/OpenSim/Tests/Clients/InstantMessage/IMClient.cs +++ b/OpenSim/Tests/Robust/Clients/InstantMessage/IMClient.cs | |||
@@ -28,47 +28,30 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Text; | 30 | using System.Text; |
31 | using System.Reflection; | ||
32 | 31 | ||
33 | using OpenMetaverse; | 32 | using OpenMetaverse; |
34 | using log4net; | 33 | using NUnit.Framework; |
35 | using log4net.Appender; | ||
36 | using log4net.Layout; | ||
37 | 34 | ||
38 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
39 | using OpenSim.Services.Interfaces; | 36 | using OpenSim.Services.Interfaces; |
40 | using OpenSim.Services.Connectors.InstantMessage; | 37 | using OpenSim.Services.Connectors.InstantMessage; |
41 | 38 | ||
42 | namespace OpenSim.Tests.Clients.InstantMessage | 39 | namespace Robust.Tests |
43 | { | 40 | { |
41 | [TestFixture] | ||
44 | public class IMClient | 42 | public class IMClient |
45 | { | 43 | { |
46 | private static readonly ILog m_log = | 44 | [Test] |
47 | LogManager.GetLogger( | 45 | public void HGIM_001() |
48 | MethodBase.GetCurrentMethod().DeclaringType); | ||
49 | |||
50 | public static void Main(string[] args) | ||
51 | { | 46 | { |
52 | ConsoleAppender consoleAppender = new ConsoleAppender(); | ||
53 | consoleAppender.Layout = | ||
54 | new PatternLayout("%date [%thread] %-5level %logger [%property{NDC}] - %message%newline"); | ||
55 | log4net.Config.BasicConfigurator.Configure(consoleAppender); | ||
56 | |||
57 | string serverURI = "http://127.0.0.1:8002"; | ||
58 | GridInstantMessage im = new GridInstantMessage(); | 47 | GridInstantMessage im = new GridInstantMessage(); |
59 | im.fromAgentID = new Guid(); | 48 | im.fromAgentID = new Guid(); |
60 | im.toAgentID = new Guid(); | 49 | im.toAgentID = new Guid(); |
61 | im.message = "Hello"; | 50 | im.message = "Hello"; |
62 | im.imSessionID = new Guid(); | 51 | im.imSessionID = new Guid(); |
63 | 52 | ||
64 | bool success = InstantMessageServiceConnector.SendInstantMessage(serverURI, im); | 53 | bool success = InstantMessageServiceConnector.SendInstantMessage(DemonServer.Address, im); |
65 | 54 | Assert.IsFalse(success, "Sending of IM succeeded, but it should have failed"); | |
66 | if (success) | ||
67 | m_log.InfoFormat("[IM CLIENT]: Successfully IMed {0}", serverURI); | ||
68 | else | ||
69 | m_log.InfoFormat("[IM CLIENT]: failed to IM {0}", serverURI); | ||
70 | |||
71 | System.Console.WriteLine("\n"); | ||
72 | } | 55 | } |
73 | 56 | ||
74 | } | 57 | } |
diff --git a/bin/Robust.Tests.ini b/bin/Robust.Tests.ini index fc405f9..e2568df 100644 --- a/bin/Robust.Tests.ini +++ b/bin/Robust.Tests.ini | |||
@@ -53,10 +53,12 @@ | |||
53 | [ServiceList] | 53 | [ServiceList] |
54 | GridServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:GridServiceConnector" | 54 | GridServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:GridServiceConnector" |
55 | PresenceServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:PresenceServiceConnector" | 55 | PresenceServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:PresenceServiceConnector" |
56 | InstantMessageServerConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:InstantMessageServerConnector" | ||
56 | 57 | ||
57 | ;InventoryInConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:XInventoryInConnector" | ||
58 | ;UserAccountServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:UserAccountServiceConnector" | 58 | ;UserAccountServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:UserAccountServiceConnector" |
59 | 59 | ||
60 | InventoryInConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:XInventoryInConnector" | ||
61 | |||
60 | ;; Uncomment as more tests are added | 62 | ;; Uncomment as more tests are added |
61 | ;AssetServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:AssetServiceConnector" | 63 | ;AssetServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:AssetServiceConnector" |
62 | ;GridInfoServerInConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:GridInfoServerInConnector" | 64 | ;GridInfoServerInConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:GridInfoServerInConnector" |
@@ -151,6 +153,9 @@ | |||
151 | [InventoryService] | 153 | [InventoryService] |
152 | LocalServiceModule = "OpenSim.Services.InventoryService.dll:XInventoryService" | 154 | LocalServiceModule = "OpenSim.Services.InventoryService.dll:XInventoryService" |
153 | 155 | ||
156 | StorageProvider = "OpenSim.Tests.Common.dll" | ||
157 | ConnectionString = "" | ||
158 | |||
154 | ; Will calls to purge folders (empty trash) and immediately delete/update items or folders (not move to trash first) succeed? | 159 | ; Will calls to purge folders (empty trash) and immediately delete/update items or folders (not move to trash first) succeed? |
155 | ; If this is set to false then some other arrangement must be made to perform these operations if necessary. | 160 | ; If this is set to false then some other arrangement must be made to perform these operations if necessary. |
156 | AllowDelete = true | 161 | AllowDelete = true |
@@ -194,41 +199,6 @@ | |||
194 | ExportSupported = true | 199 | ExportSupported = true |
195 | 200 | ||
196 | 201 | ||
197 | ; * This is the configuration for the freeswitch server in grid mode | ||
198 | [FreeswitchService] | ||
199 | LocalServiceModule = "OpenSim.Services.FreeswitchService.dll:FreeswitchService" | ||
200 | |||
201 | ;; The IP address of your FreeSWITCH server. | ||
202 | ;; This address must be reachable by viewers. | ||
203 | ; ServerAddress = 127.0.0.1 | ||
204 | |||
205 | ;; The following configuration parameters are optional | ||
206 | |||
207 | ;; By default, this is the same as the ServerAddress | ||
208 | ; Realm = 127.0.0.1 | ||
209 | |||
210 | ;; By default, this is the same as the ServerAddress on port 5060 | ||
211 | ; SIPProxy = 127.0.0.1:5060 | ||
212 | |||
213 | ;; Default is 5000ms | ||
214 | ; DefaultTimeout = 5000 | ||
215 | |||
216 | ;; The dial plan context. Default is "default" | ||
217 | ; Context = default | ||
218 | |||
219 | ;; Currently unused | ||
220 | ; UserName = freeswitch | ||
221 | |||
222 | ;; Currently unused | ||
223 | ; Password = password | ||
224 | |||
225 | ;; The following parameters are for STUN = Simple Traversal of UDP through NATs | ||
226 | ;; See http://wiki.freeswitch.org/wiki/NAT_Traversal | ||
227 | ;; stun.freeswitch.org is not guaranteed to be running so use it in | ||
228 | ;; production at your own risk | ||
229 | ; EchoServer = 127.0.0.1 | ||
230 | ; EchoPort = 50505 | ||
231 | ; AttemptSTUN = false | ||
232 | 202 | ||
233 | 203 | ||
234 | ; * This is the new style authentication service. Currently, only MySQL | 204 | ; * This is the new style authentication service. Currently, only MySQL |
@@ -251,12 +221,6 @@ | |||
251 | ; AllowSetPassword = false | 221 | ; AllowSetPassword = false |
252 | 222 | ||
253 | 223 | ||
254 | [OpenIdService] | ||
255 | ; for the server connector | ||
256 | AuthenticationServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService" | ||
257 | UserAccountServiceModule = "OpenSim.Services.UserAccountService.dll:UserAccountService" | ||
258 | |||
259 | |||
260 | ; * This is the new style authentication service. Currently, only MySQL | 224 | ; * This is the new style authentication service. Currently, only MySQL |
261 | ; * is implemented. "Realm" is the table that is used for user lookup. | 225 | ; * is implemented. "Realm" is the table that is used for user lookup. |
262 | ; * It defaults to "useraccounts", which uses the new style. | 226 | ; * It defaults to "useraccounts", which uses the new style. |
@@ -436,7 +400,7 @@ | |||
436 | 400 | ||
437 | [Messaging] | 401 | [Messaging] |
438 | ; OfflineIM | 402 | ; OfflineIM |
439 | OfflineIMService = "OpenSim.Addons.OfflineIM.dll:OfflineIMService" | 403 | OfflineIMService = "" |
440 | 404 | ||
441 | 405 | ||
442 | [GridInfoService] | 406 | [GridInfoService] |
@@ -493,3 +457,11 @@ | |||
493 | LocalServiceModule = "OpenSim.Server.Handlers.dll:XBakes" | 457 | LocalServiceModule = "OpenSim.Server.Handlers.dll:XBakes" |
494 | ;; This directory must be writable by the user ROBUST runs as. It will be created automatically. | 458 | ;; This directory must be writable by the user ROBUST runs as. It will be created automatically. |
495 | BaseDirectory = "./bakes" | 459 | BaseDirectory = "./bakes" |
460 | |||
461 | [HGInstantMessageService] | ||
462 | LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGInstantMessageService" | ||
463 | GridService = "OpenSim.Services.GridService.dll:GridService" | ||
464 | PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService" | ||
465 | UserAgentService = "" | ||
466 | ; This should always be true in the Robust config | ||
467 | InGatekeeper = True | ||