#!/bin/sh
# Run upstream's test suite against the installed fluster. The functional
# tests download conformance vectors, so they need the internet.
set -e

cp -r tests check "$AUTOPKGTEST_TMP"
cd "$AUTOPKGTEST_TMP"

# fluster stores downloaded vectors under XDG_DATA_HOME
export HOME="$AUTOPKGTEST_TMP"
export XDG_DATA_HOME="$AUTOPKGTEST_TMP/share"
export FLUSTER_CMD=fluster
# Some tests serve files from a local HTTP server on 127.0.0.1
export no_proxy=localhost,127.0.0.1

python3 -m pytest -v tests
