mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-09 12:05:50 +03:00
Merge pull request #97526 from immae/fix_ejabberd
nixos/ejabberd: Fix tests
This commit is contained in:
commit
a4a1c016a3
2 changed files with 18 additions and 4 deletions
|
@ -5,6 +5,10 @@ import ../make-test-python.nix ({ pkgs, ... }: {
|
||||||
};
|
};
|
||||||
nodes = {
|
nodes = {
|
||||||
client = { nodes, pkgs, ... }: {
|
client = { nodes, pkgs, ... }: {
|
||||||
|
networking.extraHosts = ''
|
||||||
|
${nodes.server.config.networking.primaryIPAddress} example.com
|
||||||
|
'';
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
(pkgs.callPackage ./xmpp-sendmessage.nix { connectTo = nodes.server.config.networking.primaryIPAddress; })
|
(pkgs.callPackage ./xmpp-sendmessage.nix { connectTo = nodes.server.config.networking.primaryIPAddress; })
|
||||||
];
|
];
|
||||||
|
@ -46,6 +50,11 @@ import ../make-test-python.nix ({ pkgs, ... }: {
|
||||||
module: ejabberd_service
|
module: ejabberd_service
|
||||||
access: local
|
access: local
|
||||||
shaper: fast
|
shaper: fast
|
||||||
|
-
|
||||||
|
port: 5444
|
||||||
|
module: ejabberd_http
|
||||||
|
request_handlers:
|
||||||
|
"/upload": mod_http_upload
|
||||||
|
|
||||||
## Disabling digest-md5 SASL authentication. digest-md5 requires plain-text
|
## Disabling digest-md5 SASL authentication. digest-md5 requires plain-text
|
||||||
## password storage (see auth_password_format option).
|
## password storage (see auth_password_format option).
|
||||||
|
@ -180,6 +189,7 @@ import ../make-test-python.nix ({ pkgs, ... }: {
|
||||||
mod_client_state: {}
|
mod_client_state: {}
|
||||||
mod_configure: {} # requires mod_adhoc
|
mod_configure: {} # requires mod_adhoc
|
||||||
## mod_delegation: {} # for xep0356
|
## mod_delegation: {} # for xep0356
|
||||||
|
mod_disco: {}
|
||||||
#mod_irc:
|
#mod_irc:
|
||||||
# host: "irc.@HOST@"
|
# host: "irc.@HOST@"
|
||||||
# default_encoding: "utf-8"
|
# default_encoding: "utf-8"
|
||||||
|
@ -187,9 +197,9 @@ import ../make-test-python.nix ({ pkgs, ... }: {
|
||||||
## mod_http_fileserver:
|
## mod_http_fileserver:
|
||||||
## docroot: "/var/www"
|
## docroot: "/var/www"
|
||||||
## accesslog: "/var/log/ejabberd/access.log"
|
## accesslog: "/var/log/ejabberd/access.log"
|
||||||
#mod_http_upload:
|
mod_http_upload:
|
||||||
# thumbnail: false # otherwise needs the identify command from ImageMagick installed
|
thumbnail: false # otherwise needs the identify command from ImageMagick installed
|
||||||
# put_url: "https://@HOST@:5444"
|
put_url: "http://@HOST@:5444/upload"
|
||||||
## # docroot: "@HOME@/upload"
|
## # docroot: "@HOME@/upload"
|
||||||
#mod_http_upload_quota:
|
#mod_http_upload_quota:
|
||||||
# max_days: 14
|
# max_days: 14
|
||||||
|
|
|
@ -36,7 +36,11 @@ class CthonTest(ClientXMPP):
|
||||||
def timeout_callback(arg):
|
def timeout_callback(arg):
|
||||||
log.error("ERROR: Cannot upload file. XEP_0363 seems broken")
|
log.error("ERROR: Cannot upload file. XEP_0363 seems broken")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
url = await self['xep_0363'].upload_file("${dummyFile}",timeout=10, timeout_callback=timeout_callback)
|
try:
|
||||||
|
url = await self['xep_0363'].upload_file("${dummyFile}",timeout=10, timeout_callback=timeout_callback)
|
||||||
|
except:
|
||||||
|
log.error("ERROR: Cannot run upload command. XEP_0363 seems broken")
|
||||||
|
sys.exit(1)
|
||||||
log.info('Upload success!')
|
log.info('Upload success!')
|
||||||
# Test MUC
|
# Test MUC
|
||||||
self.plugin['xep_0045'].join_muc('testMucRoom', 'cthon98', wait=True)
|
self.plugin['xep_0045'].join_muc('testMucRoom', 'cthon98', wait=True)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue