~samwhited/xmpp

internal/integration/profanity: new package

Adds a package to run integration tests against profanity.

Fixes #94

Signed-off-by: Sam Whited <sam@samwhited.com>
internal/integration: add LogFile option

This lets us copy a log file (or a FIFO, more likely) into the output,
similar to tail(1).

Signed-off-by: Sam Whited <sam@samwhited.com>
internal/integration: store certificates

Store certificates so that commands can get access to them later (eg. so
that a client can trust the certificate generated by the server using
its fingerprint).

Signed-off-by: Sam Whited <sam@samwhited.com>
internal/integration: set common env vars

Set XDG_CONFIG_HOME and XDG_DATA_HOME in case commands use these to
decide where to put config files and logs and the like.

Signed-off-by: Sam Whited <sam@samwhited.com>
ping: use sendxmpp.Ping in integration test

Signed-off-by: Sam Whited <sam@samwhited.com>
internal/integration/sendxmpp: add Ping

Add a shortcut for sending pings so that we don't have to have the same
XML scattered all over the place.

Signed-off-by: Sam Whited <sam@samwhited.com>
internal/integration: skip if no command

Previously the wrong test was being skipped if the command was not
found. Instead of the entire parent (which may have multiple child tests
where the actual command was not found) only skip the specific subtests
for that command, not the parent test.

Signed-off-by: Sam Whited <sam@samwhited.com>
internal/integration: timeout on command exit

If the command does not exit gracefully within 5 seconds after sending
the shutdown command, go ahead and kill it.

Signed-off-by: Sam Whited <sam@samwhited.com>
all: don't include internal stuff in changelog

This isn't useful to most developers and just clutters up the changelog,
making it harder for them to find actual features.

Signed-off-by: Sam Whited <sam@samwhited.com>
ping: test receiving ping from sendxmpp

Signed-off-by: Sam Whited <sam@samwhited.com>
internal/integration/sendxmpp: new package

Fixes #93

Signed-off-by: Sam Whited <sam@samwhited.com>
internal/integration: set config file permissions

The sendxmpp(1) command requires that config files be limited to the
current user. It's not likely that any other program will care or
require different permissions, so just always set them this way.

Signed-off-by: Sam Whited <sam@samwhited.com>
internal/integration: method to get the c2s port

Signed-off-by: Sam Whited <sam@samwhited.com>
internal/integration/prosody: listen on v4 and v6

It appears that sendxmpp only supports IPv4. If we're using it alongside
Prosody for integration tests, we'll need Prosody to listen on both
interfaces.

Signed-off-by: Sam Whited <sam@samwhited.com>
mux: fix the signature of IQFunc

Previously IQFunc was useless because it was identical to the IQ option.
This patch makes it take an IQHandlerFunc instead of an IQHandler
similar to how Message/MessageFunc and Presence/PresenceFunc work.

Signed-off-by: Sam Whited <sam@samwhited.com>
.builds: disable ejabberd integration tests

This temporarily skips all ejabberd integration tests since they fail on
the build VM due to an issue where the server does not shut down
entirely. Until we can figure it out, skip all ejabberd tests.

See #68

Signed-off-by: Sam Whited <sam@samwhited.com>
internal/integration: skip if command not found

Instead of failing when we try to start the command, skip any tests for
which the executable isn't found. This lets us uninstall ejabberd on the
build machines to disable tests but we can still re-enable them later as
soon as the bug shutting it down is fixed.

Signed-off-by: Sam Whited <sam@samwhited.com>
internal/integration/mellium: new package

Package mellium is an integration test package that runs itself as a
server to facilitate testing clients, and to ensure that various
stream features are round-trippable.

Signed-off-by: Sam Whited <sam@samwhited.com>
internal/integration: improve error message

I was confused about where a specific error was coming from, so add
something greppable to the beginning of the error message that describes
what's going on.

Signed-off-by: Sam Whited <sam@samwhited.com>
Next