nixos/movim: rename to prosody-nginx to be clearer
This commit is contained in:
parent
0d9a758f73
commit
d00a5703d9
@ -11,5 +11,5 @@ let
|
|||||||
];
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
standard = handleTestOn supportedSystems ./standard.nix { inherit system; };
|
prosody-nginx = handleTestOn supportedSystems ./prosody-nginx.nix { inherit system; };
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,17 +7,17 @@ import ../../make-test-python.nix (
|
|||||||
info = "No ToS in tests";
|
info = "No ToS in tests";
|
||||||
description = "NixOS testing server";
|
description = "NixOS testing server";
|
||||||
};
|
};
|
||||||
xmpp = {
|
prosody = {
|
||||||
domain = "xmpp.local";
|
domain = "prosody.local";
|
||||||
admin = rec {
|
admin = rec {
|
||||||
JID = "${username}@${xmpp.domain}";
|
JID = "${username}@${prosody.domain}";
|
||||||
username = "romeo";
|
username = "romeo";
|
||||||
password = "juliet";
|
password = "juliet";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
name = "movim-standard";
|
name = "movim-prosody-nginx";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
maintainers = with pkgs.lib.maintainers; [ toastal ];
|
maintainers = with pkgs.lib.maintainers; [ toastal ];
|
||||||
@ -33,7 +33,7 @@ import ../../make-test-python.nix (
|
|||||||
verbose = true;
|
verbose = true;
|
||||||
podConfig = {
|
podConfig = {
|
||||||
inherit (movim) description info;
|
inherit (movim) description info;
|
||||||
xmppdomain = xmpp.domain;
|
xmppdomain = prosody.domain;
|
||||||
};
|
};
|
||||||
nginx = { };
|
nginx = { };
|
||||||
};
|
};
|
||||||
@ -43,20 +43,20 @@ import ../../make-test-python.nix (
|
|||||||
xmppComplianceSuite = false;
|
xmppComplianceSuite = false;
|
||||||
disco_items = [
|
disco_items = [
|
||||||
{
|
{
|
||||||
url = "upload.${xmpp.domain}";
|
url = "upload.${prosody.domain}";
|
||||||
description = "File Uploads";
|
description = "File Uploads";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
virtualHosts."${xmpp.domain}" = {
|
virtualHosts."${prosody.domain}" = {
|
||||||
inherit (xmpp) domain;
|
inherit (prosody) domain;
|
||||||
enabled = true;
|
enabled = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
Component "pubsub.${xmpp.domain}" "pubsub"
|
Component "pubsub.${prosody.domain}" "pubsub"
|
||||||
pubsub_max_items = 10000
|
pubsub_max_items = 10000
|
||||||
expose_publisher = true
|
expose_publisher = true
|
||||||
|
|
||||||
Component "upload.${xmpp.domain}" "http_file_share"
|
Component "upload.${prosody.domain}" "http_file_share"
|
||||||
http_external_url = "http://upload.${xmpp.domain}"
|
http_external_url = "http://upload.${prosody.domain}"
|
||||||
http_file_share_expires_after = 300 * 24 * 60 * 60
|
http_file_share_expires_after = 300 * 24 * 60 * 60
|
||||||
http_file_share_size_limit = 1024 * 1024 * 1024
|
http_file_share_size_limit = 1024 * 1024 * 1024
|
||||||
http_file_share_daily_quota = 4 * 1024 * 1024 * 1024
|
http_file_share_daily_quota = 4 * 1024 * 1024 * 1024
|
||||||
@ -73,7 +73,7 @@ import ../../make-test-python.nix (
|
|||||||
|
|
||||||
networking.extraHosts = ''
|
networking.extraHosts = ''
|
||||||
127.0.0.1 ${movim.domain}
|
127.0.0.1 ${movim.domain}
|
||||||
127.0.0.1 ${xmpp.domain}
|
127.0.0.1 ${prosody.domain}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -86,7 +86,7 @@ import ../../make-test-python.nix (
|
|||||||
|
|
||||||
server.wait_for_unit("prosody.service")
|
server.wait_for_unit("prosody.service")
|
||||||
server.succeed('prosodyctl status | grep "Prosody is running"')
|
server.succeed('prosodyctl status | grep "Prosody is running"')
|
||||||
server.succeed("prosodyctl register ${xmpp.admin.username} ${xmpp.domain} ${xmpp.admin.password}")
|
server.succeed("prosodyctl register ${prosody.admin.username} ${prosody.domain} ${prosody.admin.password}")
|
||||||
|
|
||||||
server.wait_for_unit("movim.service")
|
server.wait_for_unit("movim.service")
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ import ../../make-test-python.nix (
|
|||||||
assert "${movim.info}" in login_html
|
assert "${movim.info}" in login_html
|
||||||
|
|
||||||
# Test authentication POST
|
# Test authentication POST
|
||||||
server.succeed("curl --fail-with-body -b /tmp/cookies -X POST --data-urlencode 'username=${xmpp.admin.JID}' --data-urlencode 'password=${xmpp.admin.password}' http://${movim.domain}/login")
|
server.succeed("curl --fail-with-body -b /tmp/cookies -X POST --data-urlencode 'username=${prosody.admin.JID}' --data-urlencode 'password=${prosody.admin.password}' http://${movim.domain}/login")
|
||||||
|
|
||||||
server.succeed("curl -L --fail-with-body --max-redirs 1 -b /tmp/cookies http://${movim.domain}/chat")
|
server.succeed("curl -L --fail-with-body --max-redirs 1 -b /tmp/cookies http://${movim.domain}/chat")
|
||||||
'';
|
'';
|
||||||
Loading…
x
Reference in New Issue
Block a user