nixpkgs/nixos/tests/odoo.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
740 B
Nix
Raw Normal View History

{
2025-05-28 11:47:24 +08:00
package,
lib,
2025-05-28 11:47:24 +08:00
pkgs,
...
}:
{
name = "odoo";
meta.maintainers = with lib.maintainers; [ mkg20001 ];
2021-11-02 01:48:47 +01:00
2025-05-28 11:47:24 +08:00
_module.args.package = lib.mkDefault pkgs.odoo;
nodes.server = {
services.nginx = {
enable = true;
recommendedProxySettings = true;
};
2021-11-02 01:48:47 +01:00
2025-05-28 11:47:24 +08:00
services.odoo = {
enable = true;
package = package;
autoInit = true;
autoInitExtraFlags = [ "--without-demo=all" ];
domain = "localhost";
};
};
2021-11-02 01:48:47 +01:00
2025-05-28 11:47:24 +08:00
testScript = ''
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>'")
'';
}