diff --git a/src/ZB.MOM.WW.ScadaBridge.Communication/Actors/SiteCommunicationActor.cs b/src/ZB.MOM.WW.ScadaBridge.Communication/Actors/SiteCommunicationActor.cs index 311bb739..61c7017d 100644 --- a/src/ZB.MOM.WW.ScadaBridge.Communication/Actors/SiteCommunicationActor.cs +++ b/src/ZB.MOM.WW.ScadaBridge.Communication/Actors/SiteCommunicationActor.cs @@ -97,6 +97,11 @@ public class SiteCommunicationActor : ReceiveActor, IWithTimers _log.Debug("Routing DeployInstanceCommand for {0} to DeploymentManager", msg.InstanceUniqueName); _deploymentManagerProxy.Forward(msg); }); + Receive(msg => + { + _log.Debug("Routing RefreshDeploymentCommand for {0} to DeploymentManager", msg.InstanceUniqueName); + _deploymentManagerProxy.Forward(msg); + }); // Pattern 2: Lifecycle — forward to Deployment Manager Receive(msg => _deploymentManagerProxy.Forward(msg)); diff --git a/tests/ZB.MOM.WW.ScadaBridge.Communication.Tests/SiteCommunicationActorTests.cs b/tests/ZB.MOM.WW.ScadaBridge.Communication.Tests/SiteCommunicationActorTests.cs index 3059711b..e1951ad3 100644 --- a/tests/ZB.MOM.WW.ScadaBridge.Communication.Tests/SiteCommunicationActorTests.cs +++ b/tests/ZB.MOM.WW.ScadaBridge.Communication.Tests/SiteCommunicationActorTests.cs @@ -39,6 +39,21 @@ public class SiteCommunicationActorTests : TestKit dmProbe.ExpectMsg(msg => msg.DeploymentId == "dep1"); } + [Fact] + public void RefreshDeploymentCommand_ForwardedToDeploymentManager() + { + var dmProbe = CreateTestProbe(); + var siteActor = Sys.ActorOf(Props.Create(() => + new SiteCommunicationActor("site1", _options, dmProbe.Ref))); + + var command = new RefreshDeploymentCommand( + "dep1", "inst1", "hash1", "admin", DateTimeOffset.UtcNow, + "https://central/", "tok1"); + siteActor.Tell(command); + + dmProbe.ExpectMsg(msg => msg.DeploymentId == "dep1"); + } + [Fact] public void LifecycleCommands_ForwardedToDeploymentManager() {