Run a container smoke test against the real seafile daemon

Startup, shutdown and secret handling were only ever checked by hand, and the
unit tests cannot check them: they stub seaf-cli, so nothing exercised the
daemon that actually ships. The GitHub runner is x86_64, which matches the
AppImage, so the image build job can run the real thing.

tests/smoke.sh starts and stops the real daemon, sends SIGTERM through docker
stop and asserts the container exits 0 within the grace period with the daemon
shut down, checks that a configuration error exits 2 naming the variable, that
a secret mounted under /run/secrets is read and stays out of the environment,
and that a default container gets exactly the documented defaults.

The pinned client version is exposed as SEAFILE_CLI_VERSION in the image,
since seaf-cli has no --version flag and there is no package manager entry
for an AppImage.
This commit is contained in:
Maxim Shulga committed 2026-08-02 19:37:26 -07:00
1 parent 2f93e4cdbc
commit 84519cf7cc
5 files changed
+172 -5

No files matched your search

+4
View File
@@ -72,5 +72,9 @@ RUN seaf-cli --help | grep -q 'download-by-name' && \
seaf-cli list --help | grep -q '\--json' && \
python3 -c "import seafile, pysearpc, dsc.client, dsc.misc"
# Record the pinned client version in the image so it can be checked at
# runtime; seaf-cli itself has no --version flag.
ENV SEAFILE_CLI_VERSION=${SEAFILE_CLI_VERSION}
VOLUME /dsc/seafile-data
CMD ["./start.py"]