]> Git — Sourcephile - sourcephile-nix.git/blob - tests.nix
mermet: dovecot: fix typo
[sourcephile-nix.git] / tests.nix
1 # Run with : nix run -f tests.nix
2 # Debug with : nix -L run -f tests.nix driver -c nixos-test-driver
3 { system ? builtins.currentSystem
4 , config ? { }
5 , overlays ? nixpkgs/overlays.nix
6 , pkgs ? import <nixpkgs> { inherit system config overlays; }
7 ,
8 }:
9
10 let
11 nixosTest =
12 (import (pkgs.path + /nixos/lib/testing-python.nix)) {
13 inherit system pkgs;
14 extraConfigurations = [
15 ({ lib, ... }: {
16 # Propagate pkgs and its overlays to the VM,
17 # instead of reloading nixpkgs.
18 config.nixpkgs.pkgs = lib.mkDefault pkgs;
19 config.documentation.enable = false;
20 })
21 ];
22 };
23 in
24
25 nixosTest.makeTest {
26 nodes = {
27 mermet = { ... }: { };
28 };
29
30 #enableOCR = true;
31 #skipLint = true;
32 testScript = ''
33 # start_all()
34 mermet.start()
35 mermet.wait_for_unit("multi-user.target")
36 mermet.succeed(
37 "mkdir /tmp/test",
38 "mount -t tmpfs none /tmp/test",
39 "touch /tmp/test/hello",
40 "test -f /tmp/test/hello",
41 )
42 '';
43 }