nixos/tests/outline: drop minio to simplify test; increase memorySize do to OOM error

This commit is contained in:
Alexander Sieg
2025-09-19 20:53:15 +02:00
parent 16edd8604c
commit 8073392362

View File

@@ -1,15 +1,4 @@
{ pkgs, lib, ... }: { lib, ... }:
let
accessKey = "BKIKJAA5BMMU2RHO6IBB";
secretKey = "V7f1CwQqAcwo80UEIJEjc5gVQUSSx5ohQ9GSrr12";
secretKeyFile = pkgs.writeText "outline-secret-key" ''
${secretKey}
'';
rootCredentialsFile = pkgs.writeText "minio-credentials-full" ''
MINIO_ROOT_USER=${accessKey}
MINIO_ROOT_PASSWORD=${secretKey}
'';
in
{ {
name = "outline"; name = "outline";
@@ -17,37 +6,19 @@ in
node.pkgsReadOnly = false; node.pkgsReadOnly = false;
nodes.outline = nodes.outline = {
{ pkgs, config, ... }: virtualisation.memorySize = 2 * 1024;
{ nixpkgs.config.allowUnfree = true;
nixpkgs.config.allowUnfree = true; services.outline = {
environment.systemPackages = [ pkgs.minio-client ]; enable = true;
services.outline = { forceHttps = false;
enable = true; storage = {
forceHttps = false; storageType = "local";
storage = {
inherit accessKey secretKeyFile;
uploadBucketUrl = "http://localhost:9000";
uploadBucketName = "outline";
region = config.services.minio.region;
};
};
services.minio = {
enable = true;
inherit rootCredentialsFile;
}; };
}; };
};
testScript = '' testScript = ''
machine.wait_for_unit("minio.service")
machine.wait_for_open_port(9000)
# Create a test bucket on the server
machine.succeed(
"mc alias set minio http://localhost:9000 ${accessKey} ${secretKey} --api s3v4"
)
machine.succeed("mc mb minio/outline")
outline.wait_for_unit("outline.service") outline.wait_for_unit("outline.service")
outline.wait_for_open_port(3000) outline.wait_for_open_port(3000)
outline.succeed("curl --fail http://localhost:3000/") outline.succeed("curl --fail http://localhost:3000/")