about summary refs log tree commit diff
path: root/nixos/tests/signal-desktop.nix
AgeCommit message (Collapse)AuthorFilesLines
2023-05-19nixos/tests: fix typosfigsoda1-1/+1
2022-07-22nixos/tests/signal-desktop: Fix the sqlite3 part of the test (regressed)Michael Weiss1-1/+1
Due to recent changes (likely a sqlite3 update) the sqlite3 meta-command did suddenly succeed while sqlite3 is still unable to read the still encrypted database. It just prints the following output and doesn't seem to try to open/read the DB (which would fail): ``` main: /home/alice/.config/Signal/sql/db.sqlite r/w ``` We can simply fix this "regression" by instructing sqlite3 to list the tables in the database (which fails because it cannot read the encrypted DB): ``` machine: must fail: su - alice -c 'sqlite3 ~/.config/Signal/sql/db.sqlite .tables' machine # [ 47.036720] su[1178]: Successful su for alice by root machine # [ 47.041049] su[1178]: pam_unix(su:session): session opened for user alice(uid=1000) by (uid=0) machine # Error: file is not a database machine # [ 47.116070] su[1178]: pam_unix(su:session): session closed for user alice (finished: must fail: su - alice -c 'sqlite3 ~/.config/Signal/sql/db.sqlite .tables', in 0.12 seconds) ``` Fix #181463.
2022-03-28treewide: machine -> nodes.machineRobert Hensing1-1/+1
2021-11-21nixos/qemu-vm: default memorySize 384 -> 1024Artturin1-1/+0
the default hasn't been changed since 2009 this can improve our test performances nixos/tests: remove explicit memorySize <1024 1024MiB is now the default
2021-11-05nixosTests: Redirect stdout to stderr when detachingRobert Hensing1-1/+1
Avoids blocking on stdout.
2021-08-05nixos/tests/signal-desktop: Improve the DB testMichael Weiss1-5/+21
The command "file ~/.config/Signal/sql/db.sqlite | grep 'db.sqlite: data'" can randomly fail because "file" sometimes recognizes the "random" (encrypted) data as something. This occasionally causes test failures, e.g. [0] were it was recognized as "PGP Secret Sub-key -" or in another instance as an ext4 filesystem [1]. [0]: https://github.com/NixOS/nixpkgs/pull/132644#issuecomment-892601504 [1]: https://social.primeos.dev/notice/A7H8VWV0KtQHUZZIsC
2021-05-14signal-desktop: Fix the database encryption by preloading SQLCipherMichael Weiss1-5/+4
AFAIK this is the only reliable way for us to ensure SQLCipher will be loaded instead of SQLite. It feels like a hack/workaround but according to the SQLCipher developers [0] "this issue can and should be handled downstream at the application level: 1. While it may feel like a workaround, using LD_PRELOAD is a legitimate approach here because it will substitute the system SQLite with SQLCipher which is the intended usage model;". This fixes #108772 for NixOS 20.09 users who upgrade to NixOS 21.05 and replaces #117555. For nixos-unstable users this will unfortunately break everything again so we should add a script to ease the transition (in a separate commit so that we can revert it for NixOS 21.05). [0]: https://github.com/sqlcipher/sqlcipher/issues/385#issuecomment-802874340
2021-05-13nixos/tests/signal-desktop: test if the SQLite DB is (un)encryptedMichael Weiss1-2/+14
Well, this should test if the database is encrypted but currently it is still unencrypted and we need to notice if this behaviour changes in the future (as it will cause data loss, see e.g. #108772). Anyway, this doesn't really matter for security reasons but we need this test to prevent data loss (unfortunately Signal-Desktop and SQLCipher handle this badly... :o).
2021-01-10treewide: simplify pkgs.stdenv.lib -> pkgs.libDominik Xaver Hörl1-1/+1
The library does not depend on stdenv, that `stdenv` exposes `lib` is an artifact of the ancient origins of nixpkgs.
2020-09-13signal-desktop: fix testKai Harries1-2/+7
Test was broken because network is not available during sandboxed test run and therefore the expected text was never shown. ZHF: #97479
2020-03-09tests: Fix signal-desktopdevhell1-0/+1
This test fails due to OOM on the VM. Setting the memory of the VM to 1024 lets the test succeed. Cc: @flokli
2020-01-29nixos/display-managers/auto: removeworldofpeace1-1/+1
This module allows root autoLogin, so we would break that for users, but they shouldn't be using it anyways. This gives the impression like auto is some special display manager, when it's just lightdm and special pam rules to allow root autoLogin. It was created for NixOS's testing so I believe this is where it belongs.
2019-11-06nixos/signal-desktop: port test to pythonJan Hrnko1-6/+6
2019-05-23nixosTests.signal-desktop: add testFlorian Klink1-0/+37