summary refs log tree commit diff
path: root/nixos/tests/odoo.nix
blob: 96e3405482b414726bfa6fb433a5141505f0ee20 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import ./make-test-python.nix ({ pkgs, lib, ...} : with lib; {
  name = "odoo";
  meta = with pkgs.lib.maintainers; {
    maintainers = [ mkg20001 ];
  };

  nodes = {
    server = { ... }: {
      services.nginx = {
        enable = true;
        recommendedProxySettings = true;
      };

      services.odoo = {
        enable = true;
        domain = "localhost";
      };
    };
  };

  testScript = { nodes, ... }:
  ''
    server.wait_for_unit("odoo.service")
    server.wait_until_succeeds("curl -s http://localhost:8069/web/database/selector | grep '<title>Odoo</title>'")
    server.succeed("curl -s http://localhost/web/database/selector | grep '<title>Odoo</title>'")
  '';
})