Commit Graph

20 Commits

Author SHA1 Message Date
Félix Baylac-Jacqué
8040c468ed
nixosTests/prosody[-mysql]: fix tests TLS setup
The tests TLS setup was bogus: the xmpp-send-message script was trying
to connect to the server through a bogus domain name. Injecting the
right one.

I'm a bit confused about that one. I know for sure this NixOS test
succeeded last time I checked it, but the TLS conf is bogus for sure.
I assume the slixmpp SNI validation was a bit too loose and was
tightened at some point.
2022-11-23 11:05:12 +01:00
Félix Baylac-Jacqué
501d684de8
nixosTests/prosody: add timeout
The xmpp-sendmessage the slixmpp-powered python script tend to timeout
and block the nixos channels.

Adding a signal-based timeout making sure that whatever happens, the
script won't run for more than 2 minutes. That should be pleinty
enough time to finish regardless of the runner specs. As a data point,
it runs in about 10 secs on my desktop machine.
2022-11-23 11:03:00 +01:00
olaf
f5e7b38c82 or consistency use bob in tests instead of john 2022-08-05 13:27:03 +02:00
Félix Baylac-Jacqué
788ac72c78
nixosTests.prosody: remove explicit timeout_callback error path
Slixmpp is yielding a IqTimeout error when timeout is reached. This
exception should be catched by the catchall exept clause. Removing the
useless timeout_callback function.

Kudos to
https://lab.louiz.org/poezio/slixmpp/-/merge_requests/198#note_16939
for that one.
2022-05-02 12:43:19 +02:00
Izorkin
7629826b03
nixos/tests/prosody: return prosody-mysql test 2022-02-18 22:23:13 +03:00
Andreas Rammhold
4369bebd9a
nixos/tests: remove broken prosody-mysql test
The test has been broken for some time and the test errors are
non-obvious. None of the current maintainers know how to fix it so it is
better to get rid of it then to keep a continously failing test.
2022-01-14 22:26:16 +01:00
Robert Hensing
fbafeb7ad5 treewide: runCommandNoCC -> runCommand
This has been synonymous for ~5y.
2021-08-15 17:36:41 +02:00
Félix Baylac-Jacqué
6325d15e90
nixosTests.prosody: extend- self-signed cert expiration date
The test certificate expiration date was set to the default 30 days.
This certificate is generated through its own derivation. As with
every derivation, it gets cached by cache.nixos.org once we build it.

In practice, we rebuild this derivation only if one of its input
changes. The only inputs here being openssl and stdenv.

While it's not an issue on the unstable branches, it can be
problematic on a stable release: the test will fail after 30 days.

Extending the certificate lifespan from 1 month to 100 years to prevent
it from getting expired while being cached.

See
https://github.com/NixOS/nixpkgs/pull/132898#issuecomment-894495057
for more context.
2021-08-06 23:46:17 +02:00
Andrey Golovizin
3fd5a41676 nixos/prosody: fix broken tests 2021-02-12 06:54:20 +01:00
Dominik Xaver Hörl
25bef2d8f9 treewide: simplify pkgs.stdenv.lib -> pkgs.lib
The library does not depend on stdenv, that `stdenv` exposes `lib` is
an artifact of the ancient origins of nixpkgs.
2021-01-10 20:12:06 +01:00
Ismaël Bouya
cdaec7e9ed
ejabberd: fix failing tests
This commit fixes the ejabberd tests for hydra:

mod_http_upload and mod_disco need to be explicitly enabled, and a
handler needs to be setup to make it work. Also, the client needs to be
able to contact the server.

The commit also fixes the situation where http upload failed: in that
case the client would wait forever because nothing catched the error.

Finally, there remains a non-reproducible error where ejabberd server
fails to start with an error like:
format: "Failed to create cookie file '/var/lib/ejabberd/.erlang.cookie': eacces"
(happens ~15%) I tried to check existence of /var/lib/ejabberd/ in
pre-start script and saw nothing that would explain this error, so I
gave up about this error in particular.
2020-09-10 01:08:22 +02:00
Martin Milata
96146a9476 nixosTests.prosodyMysql: fix
Since 8aea5288 xmpp-sendmessage.nix tests MUC and HTTP upload,
change the test to reflect this.
2020-05-04 00:14:42 +02:00
Félix Baylac-Jacqué
8aea528872
nixos/prosody: make defaults comply with XEP-0423
Setting up a XMPP chat server is a pretty deep rabbit whole to jump in
when you're not familiar with this whole universe. Your experience
with this environment will greatly depends on whether or not your
server implements the right set of XEPs.

To tackle this problem, the XMPP community came with the idea of
creating a meta-XEP in charge of listing the desirable XEPs to comply
with. This meta-XMP is issued every year under an new XEP number. The
2020 one being XEP-0423[1].

This prosody nixos module refactoring makes complying with XEP-0423
easier. All the necessary extensions are enabled by default. For some
extensions (MUC and HTTP_UPLOAD), we need some input from the user and
cannot provide a sensible default nixpkgs-wide. For those, we guide
the user using a couple of assertions explaining the remaining manual
steps to perform.

We took advantage of this substential refactoring to refresh the
associated nixos test.

Changelog:
- Update the prosody package to provide the necessary community
  modules in order to comply with XEP-0423. This is a tradeoff, as
  depending on their configuration, the user might end up not using them
  and wasting some disk space. That being said, adding those will
  allow the XEP-0423 users, which I expect to be the majority of
  users, to leverage a bit more the binary cache.
- Add a muc submodule populated with the prosody muc defaults.
- Add a http_upload submodule in charge of setting up a basic http
  server handling the user uploads. This submodule is in is
  spinning up an HTTP(s) server in charge of receiving and serving the
  user's attachments.
- Advertise both the MUCs and the http_upload endpoints using mod disco.
- Use the slixmpp library in place of the now defunct sleekxmpp for
  the prosody NixOS test.
- Update the nixos test to setup and test the MUC and http upload
  features.
- Add a couple of assertions triggered if the setup is not xep-0423
  compliant.

[1] https://xmpp.org/extensions/xep-0423.html
2020-04-30 20:39:54 +02:00
Jacek Galowicz
76605b2127 nixos/ejabberd: Port test to python 2019-11-26 10:03:34 +01:00
Robin Gloster
433972d65b
nixosTests.prosody*: port to python 2019-11-24 13:04:11 +01:00
ajs124
9a0e820f5d nixos/ejabberd: fix test for new release 2019-08-20 11:09:40 +02:00
Izorkin
89c69bfb79 prosody: fix work after update luadbi packages 2019-08-20 10:24:49 +03:00
Izorkin
bb4816d41c nixos/tests/prosodyMysql: add check work prosody with MySQL database 2019-08-20 10:24:49 +03:00
Izorkin
e328ea9c11 nixos/tests/prosody: checking work prosody through local network 2019-08-20 10:24:48 +03:00
Izorkin
691da63cba nixos/tests: move ejabberd and prosody test to xmpp folder 2019-08-20 10:24:47 +03:00