Made the default keys of the rsync json be parsed in kebab-case, and added a test for the sync-on-warnings flag

This commit is contained in:
Carl Johnsen
2026-01-28 09:54:32 +01:00
parent 505fa4dd35
commit 8fa514f940
2 changed files with 20 additions and 1 deletions
@@ -379,6 +379,21 @@ namespace Duplicati.UnitTest
Assert.AreEqual(0, destinations.Count);
}
[Test]
[Category("RemoteSync")]
public void TestConfigure_SyncOnWarnings()
{
var options = new Dictionary<string, string>
{
["remote-sync-json-config"] = $"{{\"sync-on-warnings\": false, \"destinations\": [{{\"url\": \"file://{dest1}\"}}]}}"
};
module.Configure(options);
var syncOnWarnings = module.GetType().GetField("m_syncOnWarnings", BINDING_FLAGS).GetValue(module);
Assert.IsFalse((bool)syncOnWarnings);
}
[Test]
[Category("RemoteSync")]
public void TestShouldTriggerSync_Scheduled_Initial()