services/mongooseim: Allow to specify config file.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
pkgs: Add a small XMPP client utility for testing.

This is going to be used in VM tests in order to simulate real clients
and to communicate between different servers while we're going to try
doing live updates.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
tests: Add a basic test trying to register users.

Nothing too fancy yet, we're using two clients, two servers and each
client is registering a JID on one of those servers.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
pkgs: Add MongooseIM's test suite.

We're going to throw away the Python approach and use Escalus tests
instead, because it's way less painful especially when dealing with
cuncurrency and the tests are also way more flexible.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
mongooseimTests: Precompile test runner.

We don't ship the source code in the store path, so it might be a good
idea to actually generate the necessary BEAM files.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
services/mongooseim: Allow to specify a node name.

This now defaults to the hostname the machine has set in
config.networking.hostName, so it usually shouldn't be necessary to
change this.

Not acceptable however is the previous behaviour where the node name was
set to localhost.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
buildErlang: Fix indentation error.

It just hurts my eyes, no change in functionality.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
exml: Symlink exml_drv.so to exml.so.

This is primarily because sometimes[TM] (need to investigate someday)
some applications expect that the library name doesn't have a _drv
suffix.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
mongooseimTests: Install deps, tests and configs.

I guess in the long term it would make more sense to only ship the
source code and the dependencies, because the tests are compiled at
runtime.

But for now, shipping a more-or-less stripped down version of the source
is sufficient.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
tests/mongooseim: Reduce debug level and cleanup.

Clean up the generated ejabberd.cfg a bit and primarily reduce log level
down to 4, because we don't want to get megabytes of shitload thrown
into our face.

This now also defines some attributes we need later for our improved
tests.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
tests/mongooseim: Refactor tests to use Escalus.

We can now run large parts of the test suite from ESL.

Unfortunately quite a lot here is unbelievably ugly and needs to
refactored even more. For example parts of the patching is done in the
mongooseimTests derivation, parts of them are done here at the tests.

Also, paths need to be cleaned up and there are a few hardcoded values,
like eg. the cookie.

However, most of the tests are already running successfully and this is
a big step forward instead of trying to write our own test suite for
ourselves.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
mongooseimTests: Deactivate system_monitor_SUITE.

Only temporary, because it crashes the test runner.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Remove obsolete XMPP tests in Python.

We're using Escalus now, which is WAY better for testing XMPP servers
(primarily because its actually the goal of the application), so no need
to write crappy tests in Python.

Originally, I wanted to keep those tests as simple as possible, thus I
wen't for a quick and dirty Python script. But it probably wouldn't have
worked out very well in the long term, so I'm glad we made this decision
early.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>