Skip to content

docker-entrypoint.sh has no automated test, so entrypoint changes ship unverified by CI #13

Closed

Description

@dmccoystephenson

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.

This issue was filed during a Gardener session (https://github.com/Stephenson-Software/gardener).


drafted by Claude on behalf of Daniel Stephenson

Activity

  1. added a commit that references this issue on Sep 7, 2026
    668e282
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions