From e7f46b5ef3f3bac9cfa8ddb71434ca31dda03eef Mon Sep 17 00:00:00 2001 From: Carl Johnsen Date: Wed, 28 Jan 2026 05:38:59 +0100 Subject: [PATCH] Renamed schedule to interval in tests --- .../RemoteSynchronizationModuleTests.cs | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/Duplicati/UnitTest/RemoteSynchronizationModuleTests.cs b/Duplicati/UnitTest/RemoteSynchronizationModuleTests.cs index 45716bab5..576c4abdc 100644 --- a/Duplicati/UnitTest/RemoteSynchronizationModuleTests.cs +++ b/Duplicati/UnitTest/RemoteSynchronizationModuleTests.cs @@ -92,7 +92,7 @@ namespace Duplicati.UnitTest var module = new RemoteSynchronizationModule(); var options = new Dictionary { - ["remote-sync-json-config"] = @"{""destinations"": [{""url"": ""file:///test/dest1"", ""mode"": ""inline""}, {""url"": ""file:///test/dest2"", ""mode"": ""scheduled""}]}" + ["remote-sync-json-config"] = @"{""destinations"": [{""url"": ""file:///test/dest1"", ""mode"": ""inline""}, {""url"": ""file:///test/dest2"", ""mode"": ""interval""}]}" }; module.Configure(options); @@ -100,7 +100,7 @@ namespace Duplicati.UnitTest var destinations = module.GetType().GetField("m_destinations", BINDING_FLAGS).GetValue(module) as List; Assert.AreEqual(2, destinations.Count); Assert.AreEqual(RemoteSyncTriggerMode.Inline, destinations[0].Mode); - Assert.AreEqual(RemoteSyncTriggerMode.Scheduled, destinations[1].Mode); + Assert.AreEqual(RemoteSyncTriggerMode.Interval, destinations[1].Mode); } [Test] @@ -110,15 +110,15 @@ namespace Duplicati.UnitTest var module = new RemoteSynchronizationModule(); var options = new Dictionary { - ["remote-sync-json-config"] = @"{""destinations"": [{""url"": ""file:///test/dest1"", ""schedule"": ""1:00:00""}, {""url"": ""file:///test/dest2"", ""schedule"": ""2:00:00""}]}" + ["remote-sync-json-config"] = @"{""destinations"": [{""url"": ""file:///test/dest1"", ""interval"": ""1:00:00""}, {""url"": ""file:///test/dest2"", ""interval"": ""2:00:00""}]}" }; module.Configure(options); var destinations = module.GetType().GetField("m_destinations", BINDING_FLAGS).GetValue(module) as List; Assert.AreEqual(2, destinations.Count); - Assert.AreEqual(TimeSpan.FromHours(1), destinations[0].Schedule); - Assert.AreEqual(TimeSpan.FromHours(2), destinations[1].Schedule); + Assert.AreEqual(TimeSpan.FromHours(1), destinations[0].Interval); + Assert.AreEqual(TimeSpan.FromHours(2), destinations[1].Interval); } [Test] @@ -182,7 +182,7 @@ namespace Duplicati.UnitTest var module = new RemoteSynchronizationModule(); var options = new Dictionary { - ["remote-sync-json-config"] = @"{""destinations"": [{""url"": ""file:///test/dest"", ""mode"": ""scheduled"", ""schedule"": ""1:00:00""}]}", + ["remote-sync-json-config"] = @"{""destinations"": [{""url"": ""file:///test/dest"", ""mode"": ""interval"", ""interval"": ""1:00:00""}]}", ["dbpath"] = DBFILE }; module.Configure(options); @@ -347,15 +347,15 @@ namespace Duplicati.UnitTest var module = new RemoteSynchronizationModule(); var options = new Dictionary { - ["remote-sync-json-config"] = @"{""destinations"": [{""url"": ""file:///test/dest1"", ""schedule"": ""1:00:00""}, {""url"": ""file:///test/dest2"", ""schedule"": ""invalid""}]}" + ["remote-sync-json-config"] = @"{""destinations"": [{""url"": ""file:///test/dest1"", ""interval"": ""1:00:00""}, {""url"": ""file:///test/dest2"", ""interval"": ""invalid""}]}" }; module.Configure(options); var destinations = module.GetType().GetField("m_destinations", BINDING_FLAGS).GetValue(module) as List; Assert.AreEqual(2, destinations.Count); - Assert.AreEqual(TimeSpan.FromHours(1), destinations[0].Schedule); - Assert.AreEqual(null, destinations[1].Schedule); // Invalid defaults to null + Assert.AreEqual(TimeSpan.FromHours(1), destinations[0].Interval); + Assert.AreEqual(null, destinations[1].Interval); // Invalid defaults to null } [Test] @@ -383,7 +383,7 @@ namespace Duplicati.UnitTest var module = new RemoteSynchronizationModule(); var options = new Dictionary { - ["remote-sync-json-config"] = @"{""destinations"": [{""url"": ""file:///test/dest"", ""mode"": ""scheduled"", ""schedule"": ""1:00:00""}]}", + ["remote-sync-json-config"] = @"{""destinations"": [{""url"": ""file:///test/dest"", ""mode"": ""interval"", ""interval"": ""1:00:00""}]}", ["dbpath"] = DBFILE }; module.Configure(options); @@ -405,7 +405,7 @@ namespace Duplicati.UnitTest var module = new RemoteSynchronizationModule(); var options = new Dictionary { - ["remote-sync-json-config"] = @"{""destinations"": [{""url"": ""file:///test/dest"", ""mode"": ""scheduled"", ""schedule"": ""1:00:00""}]}", + ["remote-sync-json-config"] = @"{""destinations"": [{""url"": ""file:///test/dest"", ""mode"": ""interval"", ""interval"": ""1:00:00""}]}", ["dbpath"] = DBFILE }; module.Configure(options); @@ -437,7 +437,7 @@ namespace Duplicati.UnitTest var module = new RemoteSynchronizationModule(); var options = new Dictionary { - ["remote-sync-json-config"] = @"{""destinations"": [{""url"": ""file:///test/dest"", ""mode"": ""scheduled"", ""schedule"": ""1:00:00""}]}", + ["remote-sync-json-config"] = @"{""destinations"": [{""url"": ""file:///test/dest"", ""mode"": ""interval"", ""interval"": ""1:00:00""}]}", ["dbpath"] = DBFILE }; module.Configure(options); @@ -729,7 +729,7 @@ namespace Duplicati.UnitTest var module = new RemoteSynchronizationModule(); var options = new Dictionary { - ["remote-sync-json-config"] = @"{""destinations"": [{""url"": ""file:///test/dest1""}, {""url"": ""file:///test/dest2"", ""mode"": ""scheduled""}]}" + ["remote-sync-json-config"] = @"{""destinations"": [{""url"": ""file:///test/dest1""}, {""url"": ""file:///test/dest2"", ""mode"": ""interval""}]}" }; module.Configure(options); @@ -738,7 +738,7 @@ namespace Duplicati.UnitTest Assert.AreEqual(2, destinations.Count); Assert.AreEqual(RemoteSyncTriggerMode.Inline, destinations[0].Mode); // Default - Assert.AreEqual(RemoteSyncTriggerMode.Scheduled, destinations[1].Mode); + Assert.AreEqual(RemoteSyncTriggerMode.Interval, destinations[1].Mode); } [Test] @@ -803,7 +803,7 @@ namespace Duplicati.UnitTest var module = new RemoteSynchronizationModule(); var options = new Dictionary { - ["remote-sync-json-config"] = @"{""destinations"": [{""url"": ""file:///test/dest"", ""mode"": ""scheduled""}]}", + ["remote-sync-json-config"] = @"{""destinations"": [{""url"": ""file:///test/dest"", ""mode"": ""interval""}]}", ["dbpath"] = DBFILE }; module.Configure(options); @@ -848,7 +848,7 @@ namespace Duplicati.UnitTest var module = new RemoteSynchronizationModule(); var options = new Dictionary { - ["remote-sync-json-config"] = @"{""destinations"": [{""url"": ""file:///dest1"", ""mode"": ""inline""}, {""url"": ""file:///dest2"", ""mode"": ""scheduled"", ""schedule"": ""1:00:00""}]}", + ["remote-sync-json-config"] = @"{""destinations"": [{""url"": ""file:///dest1"", ""mode"": ""inline""}, {""url"": ""file:///dest2"", ""mode"": ""interval"", ""interval"": ""1:00:00""}]}", ["dbpath"] = DBFILE }; module.Configure(options); @@ -874,7 +874,7 @@ namespace Duplicati.UnitTest var result = new TestBasicResults(ParsedResultType.Success); module.OnFinish(result, null); - // Check that one additional sync was recorded (dest1 inline, dest2 scheduled not due) + // Check that one additional sync was recorded (dest1 inline, dest2 interval not due) cmd.CommandText = @" SELECT COUNT(*) FROM ""Operation""