mirror of
https://github.com/dali99/nixos-matrix-modules.git
synced 2025-09-10 04:53:48 +02:00
WIP: create tests
This commit is contained in:
18
tests/auto-workers-config.nix
Normal file
18
tests/auto-workers-config.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
services.matrix-synapse-next = {
|
||||
enable = true;
|
||||
settings.server_name = "matrix.example.com";
|
||||
|
||||
workers = {
|
||||
enableMetrics = true;
|
||||
|
||||
federationSenders = 2;
|
||||
federationReceivers = 2;
|
||||
initialSyncers = 2;
|
||||
normalSyncers = 2;
|
||||
eventPersisters = 2;
|
||||
useUserDirectoryWorker = true;
|
||||
};
|
||||
};
|
||||
}
|
7
tests/base-config.nix
Normal file
7
tests/base-config.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
services.matrix-synapse-next = {
|
||||
enable = true;
|
||||
settings.server_name = "matrix.example.com";
|
||||
};
|
||||
}
|
16
tests/default.nix
Normal file
16
tests/default.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ nixpkgs, pkgs, system ? pkgs.system, nixosModule, ... }: let
|
||||
buildSystemWithConfig = configPath: (nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
nixosModule
|
||||
configPath
|
||||
{
|
||||
boot.isContainer = true;
|
||||
}
|
||||
];
|
||||
}).config.system.build.toplevel;
|
||||
in {
|
||||
a = pkgs.writeText "hello-world" ''a'';
|
||||
base-config = buildSystemWithConfig ./base-config.nix;
|
||||
auto-workers-config = buildSystemWithConfig ./auto-workers-config.nix;
|
||||
}
|
Reference in New Issue
Block a user