You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docker-entrypoint.sh has no automated test, so entrypoint changes ship unverified by CI #13
docker-entrypoint.sh translates three environment variables into JVM system properties (BACKUP_DIRECTORY, SCHEDULED_USERS, and BACKUP_INTERVAL_MS as of PR #12), but no test exercises it.
Neither CI job covers the script:
build runs mvn clean verify, which cannot execute a shell script.
docker-build builds the image, which confirms the script is copied and made executable, but never starts a container, so the branches inside the script are never run.
The result is that any change to the entrypoint — including the one merged in PR #12 — lands with a fully green CI run while the changed lines have never been executed. A typo in a property name or a broken guard would not be caught until a user's container came up with the wrong configuration.
Suggested resolution:
A test script is added that puts a stub java on PATH (one that prints its argv rather than starting a JVM), invokes docker-entrypoint.sh under a few environment combinations, and asserts the constructed argument list. Cases worth covering: no variables set, each variable set individually, all three set together, and a variable set to the empty string (which must not append an argument).
A step is added to the docker-build job in .github/workflows/build.yml to run that script. GitHub Actions' ubuntu-latest runner can execute sh directly, so no container is required.
Optionally, shellcheck is run over docker-entrypoint.sh in the same step to catch quoting and portability problems.
This gap was identified during the self-review of PR #12 (#12), where the entrypoint change could not be executed and had to be accepted on hand review alone.
Activity
Add automated test for docker-entrypoint.sh (#17)