Skip to content

Commit

Permalink
nixos/tests/signal-desktop: test if the SQLite DB is encrypted
Browse files Browse the repository at this point in the history
Based on commit 940dfa9 (#122926) but
specific for NixOS 20.09 (to verify and ensure that the DB is still
encrypted there).
  • Loading branch information
primeos committed May 15, 2021
1 parent fca28ec commit 0067458
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions nixos/tests/signal-desktop.nix
Expand Up @@ -44,12 +44,8 @@ import ./make-test-python.nix ({ pkgs, ...} :
# - https://github.com/NixOS/nixpkgs/issues/108772
# - https://github.com/NixOS/nixpkgs/pull/117555
print(machine.succeed("su - alice -c 'file ~/.config/Signal/sql/db.sqlite'"))
# TODO: The DB should be encrypted and the following should be machine.fail
# instead of machine.succeed but the DB is currently unencrypted and we
# want to notice if this isn't the case anymore as the transition to a
# encrypted DB can cause data loss!:
machine.succeed(
"su - alice -c 'file ~/.config/Signal/sql/db.sqlite' | grep -i sqlite"
machine.fail(
"su - alice -c 'file ~/.config/Signal/sql/db.sqlite' | grep -e SQLite -e database"
)
'';
})

0 comments on commit 0067458

Please sign in to comment.