2021-10-06 21:03:48 -07:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2023-01-11 03:50:32 +01:00
|
|
|
source ../tools.sh
|
2023-01-04 14:22:55 -08:00
|
|
|
|
2021-10-06 21:03:48 -07:00
|
|
|
# Install the node test framework
|
|
|
|
npm install --silent >/dev/null
|
|
|
|
|
2023-01-12 05:11:13 +01:00
|
|
|
install_ffmpeg
|
2023-01-11 03:50:32 +01:00
|
|
|
|
2023-01-12 05:11:13 +01:00
|
|
|
start_owncast
|
2023-01-11 03:50:32 +01:00
|
|
|
|
2023-01-12 05:11:13 +01:00
|
|
|
start_stream
|
2021-10-06 21:03:48 -07:00
|
|
|
|
|
|
|
# Run tests against a fresh install with no settings.
|
|
|
|
npm test
|
|
|
|
|
2023-01-12 05:11:13 +01:00
|
|
|
# Kill the stream.
|
|
|
|
kill_with_kids "$STREAM_PID"
|
2023-01-10 21:31:27 -08:00
|
|
|
|
2021-10-06 21:03:48 -07:00
|
|
|
# Determine if we should continue testing with S3 configuration.
|
|
|
|
if [[ -z "${S3_BUCKET}" ]]; then
|
2023-01-12 05:11:13 +01:00
|
|
|
echo "No S3 configuration is set. Skipping S3 tests!"
|
2021-10-06 21:03:48 -07:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Update the server config to use S3 for storage.
|
|
|
|
update_storage_config
|
|
|
|
|
2023-01-12 05:11:13 +01:00
|
|
|
start_stream
|
2021-10-06 21:03:48 -07:00
|
|
|
|
|
|
|
# Re-run the HLS test against the external storage configuration.
|
|
|
|
npm test
|