~samwhited/xmpp

all: prepare and release 0.17.1

Signed-off-by: Sam Whited <sam@samwhited.com>
xmpp, examples: add context to Encode/EncodeElement

Fixes #36

Signed-off-by: Sam Whited <sam@samwhited.com>
xmpp: use context deadline on Send/SendElement

Fixes #35

Signed-off-by: Sam Whited <sam@samwhited.com>
xmpp, internal/xmpptest: new API for ClientServer

Using the functional options pattern like other packages in this module
lets us set more options later and set handlers on the client side of
the connection as well for now.

This also updates the existing tests using xmpptest.ClientServer and
updates the send tests to use it with the new API.

Signed-off-by: Sam Whited <sam@samwhited.com>
xmpp: simplify state locking

In a few places we locked and unlocked immediatly around multiple points
in a function that used session state. Instead, do a naive lock/unlock
at the start of the function and end to make keeping track of what's
going on easier.

Signed-off-by: Sam Whited <sam@samwhited.com>
xmpp: change some deadlines to timeouts

Signed-off-by: Sam Whited <sam@samwhited.com>
.builds: merge DCO check into validation build

Sourcehut apparently has a limit of 4 parallel builds submitted at once,
so merge the DCO and validation builds.

Signed-off-by: Sam Whited <sam@samwhited.com>
xmpp: use new xmpptest.ClientServer in IQ tests

Signed-off-by: Sam Whited <sam@samwhited.com>
xmpptest: add a client/server test mechanism

Hopefully this will allow us to get rid of the various race conditions
in the IQ tests.

Signed-off-by: Sam Whited <sam@samwhited.com>
xmpp: add RW mutex around session state

This fixes a race condition that could result in writes to a closed
stream, for example.

Signed-off-by: Sam Whited <sam@samwhited.com>
xmpp: add EncodeIQ and EncodeIQElement methods

This makes sending IQs and waiting on a reply possible with the struct
based API. Previously this was only possible if you did not want the
library to handle waiting on a reply for you.

Fixes #33

Signed-off-by: Sam Whited <sam@samwhited.com>
ping: temporarily remove Ejabberd integration test

See https://mellium.im/issue/68

Signed-off-by: Sam Whited <sam@samwhited.com>
xmpp: fix bind bug when using ejabberd

Bind was previously rendering an empty <jid/> in every bind request that
was ignored by most servers, but is technically not part of the bind
request and would break Ejabberd.

Signed-off-by: Sam Whited <sam@samwhited.com>
ping: add integration tests

Signed-off-by: Sam Whited <sam@samwhited.com>
design: update proposal 42

Update the integration testing proposal to mention that the new API is
not covered by the compatibility promise since it's in the internal/
tree.

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

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

The ejabberd package lets you configure and spin up an instance of the
Ejabberd XMPP server (https://www.ejabberd.im/) for use in integration
tests.

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

The prosody package lets you configure and spin up an instance of the
Prosody XMPP server (https://prosody.im/) for use in integration tests.

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

The internal/integration package is designed to make it easy to spin up
and configure servers for integration tests.
It is not meant to be used directly, instead it is meant to aid in
writing other packages that spin up specific servers and tools.

Fixes #42

Signed-off-by: Sam Whited <sam@samwhited.com>
design: add service discovery proposal

Signed-off-by: Sam Whited <sam@samwhited.com>
xmpp: bump minimum supported Go version to 1.14

Document that the lowest version of Go that we currently support is Go
1.14.

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