#!/bin/sh
set -eux

# create user
PASS=$(openssl rand -base64 12)
sudo sojuctl user create -username autopkgtest -password "$PASS"

# test if we can connect and authenticate
# TODO: add a tiny ircd and test if we can connect to it successfully?
python3 ./debian/tests/test-connect.py "$(hostname -f)" "$PASS"
