From 406ecdd33693dffc354ed615bc89ff04c99da245 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Fri, 1 Apr 2016 00:15:56 +0200 Subject: [PATCH] Added restore check to unittest --- Duplicati/UnitTest/BorderTests.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Duplicati/UnitTest/BorderTests.cs b/Duplicati/UnitTest/BorderTests.cs index 65f811291..8bffc5ab0 100644 --- a/Duplicati/UnitTest/BorderTests.cs +++ b/Duplicati/UnitTest/BorderTests.cs @@ -250,6 +250,21 @@ namespace Duplicati.UnitTest //Console.WriteLine(string.Join(Environment.NewLine, r.Files.Select(x => x.Path))); Assert.AreEqual(49, r.Files.Count()); } + + using(var tf = new Library.Utility.TempFolder()) + { + using(var c = new Library.Main.Controller("file://" + TARGETFOLDER, testopts.Expand(new { restore_path = tf, no_local_blocks = true }), null)) + c.Restore(null); + + TestUtils.VerifyDir(DATAFOLDER, tf, true); + } + + using(var tf = new Library.Utility.TempFolder()) + { + using(var c = new Library.Main.Controller("file://" + TARGETFOLDER, testopts.Expand(new { restore_path = tf, no_local_blocks = true }), null)) + c.Restore(new string[] { Path.Combine(DATAFOLDER, "a") + "*" }); + } + } } }