mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-08 11:35:37 +03:00
Merge master into staging-next
This commit is contained in:
commit
d4a1995529
207 changed files with 2504 additions and 11098 deletions
|
@ -37,11 +37,25 @@ let
|
|||
machine.wait_for_unit("phpfpm-matomo.service")
|
||||
machine.wait_for_unit("nginx.service")
|
||||
|
||||
with subtest("matomo.js reachable via HTTP"):
|
||||
machine.succeed("curl -sSfk http://machine/matomo.js")
|
||||
|
||||
with subtest("js/piwik.js reachable via HTTP"):
|
||||
machine.succeed("curl -sSfk http://machine/js/piwik.js")
|
||||
|
||||
with subtest("matomo.php (API) reachable via HTTP"):
|
||||
machine.succeed("curl -sSfk http://machine/matomo.php")
|
||||
|
||||
# without the grep the command does not produce valid utf-8 for some reason
|
||||
with subtest("welcome screen loads"):
|
||||
machine.succeed(
|
||||
"curl -sSfL http://localhost/ | grep '<title>Matomo[^<]*Installation'"
|
||||
)
|
||||
|
||||
with subtest("killing the phpfpm process should trigger an automatic restart"):
|
||||
machine.succeed("systemctl kill -s KILL phpfpm-matomo")
|
||||
machine.sleep(1)
|
||||
machine.wait_for_unit("phpfpm-matomo.service")
|
||||
'';
|
||||
};
|
||||
in
|
||||
|
|
|
@ -2,7 +2,7 @@ let
|
|||
cert =
|
||||
pkgs:
|
||||
pkgs.runCommand "selfSignedCerts" { buildInputs = [ pkgs.openssl ]; } ''
|
||||
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -nodes -subj '/CN=example.com/CN=muc.example.com' -days 36500
|
||||
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -nodes -subj '/CN=example.com/CN=muc.example.com/CN=matrix.example.com' -days 36500
|
||||
mkdir -p $out
|
||||
cp key.pem cert.pem $out
|
||||
'';
|
||||
|
@ -20,12 +20,12 @@ import ../make-test-python.nix (
|
|||
{
|
||||
security.pki.certificateFiles = [ "${cert pkgs}/cert.pem" ];
|
||||
networking.extraHosts = ''
|
||||
${nodes.server.config.networking.primaryIPAddress} example.com
|
||||
${nodes.server.networking.primaryIPAddress} example.com
|
||||
'';
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.callPackage ./xmpp-sendmessage.nix {
|
||||
connectTo = nodes.server.config.networking.primaryIPAddress;
|
||||
connectTo = nodes.server.networking.primaryIPAddress;
|
||||
})
|
||||
];
|
||||
};
|
||||
|
@ -35,6 +35,7 @@ import ../make-test-python.nix (
|
|||
security.pki.certificateFiles = [ "${cert pkgs}/cert.pem" ];
|
||||
networking.extraHosts = ''
|
||||
${config.networking.primaryIPAddress} example.com
|
||||
${config.networking.primaryIPAddress} matrix.example.com
|
||||
'';
|
||||
|
||||
services.ejabberd = {
|
||||
|
@ -65,6 +66,12 @@ import ../make-test-python.nix (
|
|||
port: 5269
|
||||
ip: "::"
|
||||
module: ejabberd_s2s_in
|
||||
-
|
||||
port: 8448
|
||||
module: ejabberd_http
|
||||
tls: true
|
||||
request_handlers:
|
||||
"/_matrix": mod_matrix_gw
|
||||
-
|
||||
port: 5347
|
||||
ip: "127.0.0.1"
|
||||
|
@ -275,9 +282,15 @@ import ../make-test-python.nix (
|
|||
plugins:
|
||||
- "pep"
|
||||
mod_push: {}
|
||||
mod_matrix_gw:
|
||||
key_name: key1
|
||||
key: MATRIX_SECRET
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.services.ejabberd.serviceConfig.EnvironmentFile = pkgs.writeText "ejabberd.env" ''
|
||||
EJABBERD_MACRO_MATRIX_SECRET=SU4mu/j8b8A1i1EdyxIcKlFlrp+eSRBIlZwGyHP7Mfo=
|
||||
'';
|
||||
networking.firewall.enable = false;
|
||||
};
|
||||
};
|
||||
|
@ -291,6 +304,8 @@ import ../make-test-python.nix (
|
|||
|
||||
assert "status: started" in server.succeed(ejabberd_prefix + "status")
|
||||
|
||||
server.succeed("curl https://matrix.example.com:8448/_matrix/key/v2/server")
|
||||
|
||||
server.succeed(
|
||||
ejabberd_prefix + "register azurediamond example.com hunter2",
|
||||
ejabberd_prefix + "register cthon98 example.com nothunter2",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue