Skip to content

Commit

Permalink
More test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornbouetsmith committed Jun 8, 2024
1 parent 740f990 commit 00c1328
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions Source/ROOT.Zfs.Tests/Helpers/SnapshotHelperTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ namespace ROOT.Zfs.Tests.Helpers
[TestClass]
public class SnapshotHelperTest
{
private const string SnapshotList = @"snapshot 1664116031 tank/myds@20220925162707 14336 25600 - -";
private const string SnapshotList = @"snapshot 1664116031 tank/myds@20220925162707 14336 25600 - - -";

private const string JunkLine = @"snapshot 1664116031 tank/myds@20220925162707 14336 25600";
private const string JunkLine2 = @"snapshot 2022-05-05 tank/myds@20220925162707 40G 80G - -";
private const string JunkLine2 = @"snapshot 2022-05-05 tank/myds@20220925162707 40G 80G - - -";

[TestMethod]
public void BadInputTest1()
{
var ex = Assert.ThrowsException<FormatException>(() => SnapshotHelper.FromString(JunkLine));
Assert.IsTrue(ex.Message.Contains("expected 7 parts"));
Assert.IsTrue(ex.Message.Contains("expected 8 parts"));

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -726,13 +726,13 @@ mytest ONLINE 0

private static string GetSnapshots()
{
return @"snapshot 1664097229 tank/myds@20220925111346 0 24576 - -
snapshot 1664115215 tank/myds@20220925161329 15360 25600 - -
snapshot 1664121611 tank/myds@20220925180007 14336 25600 - -
snapshot 1664718665 tank/myds@20221002155059 13312 25600 - -
snapshot 1664718665 tank/myds@20220922211347000-1 13312 25600 - -
snapshot 1664718665 tank/myds@20220922211347000-2 13312 25600 - -
snapshot 1664718665 tank/myds@20220922211347000-3 13312 25600 - -";
return @"snapshot 1664097229 tank/myds@20220925111346 0 24576 - - -
snapshot 1664115215 tank/myds@20220925161329 15360 25600 - - -
snapshot 1664121611 tank/myds@20220925180007 14336 25600 - - -
snapshot 1664718665 tank/myds@20221002155059 13312 25600 - - -
snapshot 1664718665 tank/myds@20220922211347000-1 13312 25600 - - -
snapshot 1664718665 tank/myds@20220922211347000-2 13312 25600 - - -
snapshot 1664718665 tank/myds@20220922211347000-3 13312 25600 - - -";
}

private static string GetAllProperties()
Expand Down

0 comments on commit 00c1328

Please sign in to comment.