mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-30 16:10:36 +00:00
committed by
github-actions[bot]
parent
edf2026e86
commit
16f0181265
@@ -1,4 +1,4 @@
|
||||
{ lib, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
name = "romm";
|
||||
@@ -26,6 +26,8 @@
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
import json
|
||||
|
||||
machine.start()
|
||||
|
||||
with subtest("services come up"):
|
||||
@@ -39,7 +41,8 @@
|
||||
machine.wait_for_unit("nginx.service")
|
||||
|
||||
with subtest("backend API answers"):
|
||||
machine.succeed("curl -sf http://127.0.0.1:8080/api/heartbeat")
|
||||
heartbeat = json.loads(machine.succeed("curl -sf http://127.0.0.1:8080/api/heartbeat"))
|
||||
assert heartbeat["SYSTEM"]["VERSION"] == ${builtins.toJSON config.nodes.machine.services.romm.package.version}
|
||||
|
||||
with subtest("nginx serves the frontend and proxies the API"):
|
||||
machine.succeed("curl -sf http://localhost/ | grep -iq romm")
|
||||
|
||||
@@ -32,6 +32,12 @@ stdenvNoCC.mkDerivation (
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
# Upstream stamps this placeholder during its container release build.
|
||||
postPatch = ''
|
||||
substituteInPlace backend/__version__.py \
|
||||
--replace-fail '<version>' '${finalAttrs.version}'
|
||||
'';
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user