The integration test servers for the seafile backend were still running Seafile 11. Seafile 12 changed the name of the docker image tags (the `latest` tag stops at 11.x, newer versions are published as `12.0-latest`, `13.0-latest`, `14.0-latest`) and replaced the setup variables of the image, so just bumping the tag was not enough. - use seafileltd/seafile-mc:13.0-latest, the current stable release (can be overridden with SEAFILE_VERSION; 14.0-latest, currently in beta, works too) - update the docker compose file to the Seafile 12+ layout: MariaDB 10.11, Redis for the cache, SEAFILE_MYSQL_DB_*, INIT_SEAFILE_*, JWT_PRIVATE_KEY, SEAFILE_SERVER_PROTOCOL/HOSTNAME and CACHE_PROVIDER - use `docker compose` (v2) instead of the removed `docker-compose` and don't depend on the compose v1 container names - wait for the Seahub API instead of the web server and retry the Seahub restart which raises the API throttle limits, as Seahub is not always ready when it is first asked - replace the fixed 60s sleep in TestSeafileEncrypted with a wait loop - raise the Seahub API throttle limits in TestSeafileEncrypted too, as concurrent test runs exceeded the 60 logins/minute and failed with "failed to authenticate" - report the server as running while any container of the compose project is up, so that a crashed seafile container still gets its db and cache containers torn down by stop instead of reused on the next start - remove TestSeafileV6: the seafileltd/seafile image for Seafile 6 can no longer be downloaded and it wasn't part of test_all Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This directory contains scripts to start and stop servers for testing.
The commands are named after the remotes in use. They are executable files with the following parameters:
start - starts the server if not running
stop - stops the server if nothing is using it
status - returns non-zero exit code if the server is not running
reset - stops the server and resets any reference counts
These will be called automatically by test_all if that remote is required.
When start is run it should output config parameters for that remote.
If a _connect parameter is output then that will be used for a
connection test. For example if _connect=127.0.0.1:80 then a TCP
connection will be made to 127.0.0.1:80 and only when that succeeds
will the test continue.
If in addition to _connect, _connect_delay=5s is also present then
after the connection succeeds rclone will wait 5s before continuing.
This is for servers that aren't quite ready even though they have
opened their TCP ports.
Writing new scripts
A docker based server or an rclone serve based server should be easy
to write. Look at one of the examples.
run.bash contains boilerplate to be included in a bash script for
interpreting the command line parameters. This does reference counting
to ensure multiple copies of the server aren't running at once.
Including this is mandatory. It will call your start(), stop() and
status() functions.
docker.bash contains library functions to help with docker
implementations. It contains implementations of stop() and
status() so all you have to do is write a start() function.
rclone-serve.bash contains functions to help with rclone serve
based implementations. It contains implementations of stop() and
status() so all you have to do is write a start() function which
should call the run() function provided.
Any external TCP or UDP ports used should be unique as any of the servers might be running together. So please create a new line in the PORTS file to allocate your server a port. Bind any ports to localhost so they aren't accessible externally.