Skip to content

Improve Docker image testing#4925

Open
vidya381 wants to merge 1 commit intooracle:masterfrom
vidya381:improve-docker-image-tests
Open

Improve Docker image testing#4925
vidya381 wants to merge 1 commit intooracle:masterfrom
vidya381:improve-docker-image-tests

Conversation

@vidya381
Copy link
Contributor

Fixes #4912

Problem

Current test in dev/docker.sh just runs the container and lists it. Doesn't catch real issues like the chown bug mentioned
in the issue.

Changes

Enhanced bash smoke tests

Replaced basic test with validation of:

  • Container startup (waits for Tomcat)
  • Web interface (port 8080) and REST API (port 5000)
  • File ownership - catches chown bugs
  • Log errors
  • Volume mounts

Runs in ~60-90 seconds.

Added Testcontainers integration tests

New test suite in src/test/java/org/opengrok/docker/:

  • 10 test cases covering startup, services, file ownership, indexing
  • Run with mvn verify (skip with -DskipITs=true)
  • Takes ~3-5 minutes

Dependencies added: testcontainers 1.19.3, okhttp 4.12.0

Testing

Bash tests run automatically in CI. Integration tests need Docker installed locally.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

improve test of Docker image

1 participant