Skip to content

Commit

Permalink
nixos/tests/grist-core: init
Browse files Browse the repository at this point in the history
Basic smoketest for the gVisor sandboxing.

Signed-off-by: Raito Bezarius <[email protected]>
  • Loading branch information
RaitoBezarius authored and Scandiravian committed Jan 27, 2025
1 parent 7e37b09 commit 75e3ea5
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ in {
glance = runTest ./glance.nix;
glances = runTest ./glances.nix;
glusterfs = handleTest ./glusterfs.nix {};
grist-core = handleTest ./grist-core.nix {};
gnome = handleTest ./gnome.nix {};
gnome-extensions = handleTest ./gnome-extensions.nix {};
gnome-flashback = handleTest ./gnome-flashback.nix {};
Expand Down
25 changes: 25 additions & 0 deletions nixos/tests/grist-core.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import ./make-test-python.nix (
{ lib, ... }:
with lib;
{
name = "grist";
meta.maintainers = with maintainers; [ scandiravian ];

nodes.machine =
{ pkgs, ... }:
{
services.grist-core = {
enable = true;

settings = {
DEBUG = "1";
};
};
};

testScript = ''
machine.wait_for_unit("grist-core.service")
machine.wait_until_succeeds("curl --fail http://[::1]:8484", 15)
'';
}
)
2 changes: 2 additions & 0 deletions pkgs/by-name/gr/grist-core/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
prefetch-yarn-deps,
fixup-yarn-lock,
nodePackages,
nixosTests,
makeWrapper,
}:
stdenv.mkDerivation rec {
Expand Down Expand Up @@ -66,6 +67,7 @@ stdenv.mkDerivation rec {

passthru = {
pythonEnv = python3.withPackages (_: propagatedBuildInputs);
tests = { inherit (nixosTests) grist-core; };
};

configurePhase = ''
Expand Down

0 comments on commit 75e3ea5

Please sign in to comment.