diff options
author | Jonas Heinrich <onny@project-insanity.org> | 2023-12-21 16:24:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-21 16:24:10 +0100 |
commit | 08b802c343d93f4d09deeebf187f6ec8c3233124 (patch) | |
tree | 80ba4d1e9a2b9b5b3eeee251d41e914170315325 /nixos/tests | |
parent | f42d168613bfee60edf6f2f1147c9da8e96d1ea4 (diff) | |
parent | b3475a9eefb3579cb86fecccca6337d705f1b739 (diff) |
Merge pull request #275718 from symphorien/fix-btrbk-tests
nixos/tests/btrbk-section-order.nix: fix test
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/btrbk-section-order.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nixos/tests/btrbk-section-order.nix b/nixos/tests/btrbk-section-order.nix index 20f1afcf80ec7..6082de947f66f 100644 --- a/nixos/tests/btrbk-section-order.nix +++ b/nixos/tests/btrbk-section-order.nix @@ -29,10 +29,12 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: { }; testScript = '' + import difflib machine.wait_for_unit("basic.target") - got = machine.succeed("cat /etc/btrbk/local.conf") + got = machine.succeed("cat /etc/btrbk/local.conf").strip() expect = """ backend btrfs-progs-sudo + stream_compress no timestamp_format long target ssh://global-target/ ssh_user root @@ -46,6 +48,9 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: { ssh_user root """.strip() print(got) + if got != expect: + diff = difflib.unified_diff(expect.splitlines(keepends=True), got.splitlines(keepends=True), fromfile="expected", tofile="got") + print("".join(diff)) assert got == expect ''; }) |