1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 11:40:45 +00:00

nixosTests.odoo: init

This commit is contained in:
Maciej Krüger 2021-11-02 01:48:47 +01:00
parent ede778be9c
commit f21e2644d3
No known key found for this signature in database
GPG key ID: 0D948CE19CF49C5F
2 changed files with 28 additions and 0 deletions

View file

@ -172,6 +172,7 @@ in
installed-tests = pkgs.recurseIntoAttrs (handleTest ./installed-tests {});
invidious = handleTest ./invidious.nix {};
oci-containers = handleTestOn ["x86_64-linux"] ./oci-containers.nix {};
odoo = handleTest ./odoo.nix {};
# 9pnet_virtio used to mount /nix partition doesn't support
# hibernation. This test happens to work on x86_64-linux but
# not on other platforms.

27
nixos/tests/odoo.nix Normal file
View file

@ -0,0 +1,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>'")
'';
})