Added simple test for IM in Robust too.

Changed Inventory data to use the mock one in Common Tests. (but still not inventory tests)
fsassets
Diva Canto 2015-05-10 21:49:24 -07:00
parent 4b94fb8443
commit eb9b16d284
3 changed files with 30 additions and 68 deletions

View File

@ -101,7 +101,14 @@ namespace OpenSim.Services.HypergridService
Object[] args = new Object[] { config };
m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args);
m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args);
m_UserAgentService = ServerUtils.LoadPlugin<IUserAgentService>(userAgentService, args);
try
{
m_UserAgentService = ServerUtils.LoadPlugin<IUserAgentService>(userAgentService, args);
}
catch (Exception e)
{
m_log.WarnFormat("[HG IM SERVICE]: Unable to create User Agent Service. Missing config var in [HGInstantMessageService]?");
}
m_RegionCache = new ExpiringCache<UUID, GridRegion>();

View File

@ -28,47 +28,30 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using OpenMetaverse;
using log4net;
using log4net.Appender;
using log4net.Layout;
using NUnit.Framework;
using OpenSim.Framework;
using OpenSim.Services.Interfaces;
using OpenSim.Services.Connectors.InstantMessage;
namespace OpenSim.Tests.Clients.InstantMessage
namespace Robust.Tests
{
[TestFixture]
public class IMClient
{
private static readonly ILog m_log =
LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType);
public static void Main(string[] args)
[Test]
public void HGIM_001()
{
ConsoleAppender consoleAppender = new ConsoleAppender();
consoleAppender.Layout =
new PatternLayout("%date [%thread] %-5level %logger [%property{NDC}] - %message%newline");
log4net.Config.BasicConfigurator.Configure(consoleAppender);
string serverURI = "http://127.0.0.1:8002";
GridInstantMessage im = new GridInstantMessage();
im.fromAgentID = new Guid();
im.toAgentID = new Guid();
im.message = "Hello";
im.imSessionID = new Guid();
bool success = InstantMessageServiceConnector.SendInstantMessage(serverURI, im);
if (success)
m_log.InfoFormat("[IM CLIENT]: Successfully IMed {0}", serverURI);
else
m_log.InfoFormat("[IM CLIENT]: failed to IM {0}", serverURI);
System.Console.WriteLine("\n");
bool success = InstantMessageServiceConnector.SendInstantMessage(DemonServer.Address, im);
Assert.IsFalse(success, "Sending of IM succeeded, but it should have failed");
}
}

View File

@ -53,10 +53,12 @@
[ServiceList]
GridServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:GridServiceConnector"
PresenceServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:PresenceServiceConnector"
InstantMessageServerConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:InstantMessageServerConnector"
;InventoryInConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:XInventoryInConnector"
;UserAccountServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:UserAccountServiceConnector"
InventoryInConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:XInventoryInConnector"
;; Uncomment as more tests are added
;AssetServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:AssetServiceConnector"
;GridInfoServerInConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:GridInfoServerInConnector"
@ -151,6 +153,9 @@
[InventoryService]
LocalServiceModule = "OpenSim.Services.InventoryService.dll:XInventoryService"
StorageProvider = "OpenSim.Tests.Common.dll"
ConnectionString = ""
; Will calls to purge folders (empty trash) and immediately delete/update items or folders (not move to trash first) succeed?
; If this is set to false then some other arrangement must be made to perform these operations if necessary.
AllowDelete = true
@ -194,41 +199,6 @@
ExportSupported = true
; * This is the configuration for the freeswitch server in grid mode
[FreeswitchService]
LocalServiceModule = "OpenSim.Services.FreeswitchService.dll:FreeswitchService"
;; The IP address of your FreeSWITCH server.
;; This address must be reachable by viewers.
; ServerAddress = 127.0.0.1
;; The following configuration parameters are optional
;; By default, this is the same as the ServerAddress
; Realm = 127.0.0.1
;; By default, this is the same as the ServerAddress on port 5060
; SIPProxy = 127.0.0.1:5060
;; Default is 5000ms
; DefaultTimeout = 5000
;; The dial plan context. Default is "default"
; Context = default
;; Currently unused
; UserName = freeswitch
;; Currently unused
; Password = password
;; The following parameters are for STUN = Simple Traversal of UDP through NATs
;; See http://wiki.freeswitch.org/wiki/NAT_Traversal
;; stun.freeswitch.org is not guaranteed to be running so use it in
;; production at your own risk
; EchoServer = 127.0.0.1
; EchoPort = 50505
; AttemptSTUN = false
; * This is the new style authentication service. Currently, only MySQL
@ -251,12 +221,6 @@
; AllowSetPassword = false
[OpenIdService]
; for the server connector
AuthenticationServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
UserAccountServiceModule = "OpenSim.Services.UserAccountService.dll:UserAccountService"
; * This is the new style authentication service. Currently, only MySQL
; * is implemented. "Realm" is the table that is used for user lookup.
; * It defaults to "useraccounts", which uses the new style.
@ -436,7 +400,7 @@
[Messaging]
; OfflineIM
OfflineIMService = "OpenSim.Addons.OfflineIM.dll:OfflineIMService"
OfflineIMService = ""
[GridInfoService]
@ -493,3 +457,11 @@
LocalServiceModule = "OpenSim.Server.Handlers.dll:XBakes"
;; This directory must be writable by the user ROBUST runs as. It will be created automatically.
BaseDirectory = "./bakes"
[HGInstantMessageService]
LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGInstantMessageService"
GridService = "OpenSim.Services.GridService.dll:GridService"
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
UserAgentService = ""
; This should always be true in the Robust config
InGatekeeper = True