Skip to content

Implement Testcontainers for development and testing#5

Open
ajeetraina wants to merge 20 commits intomainfrom
feature/testcontainers-integration
Open

Implement Testcontainers for development and testing#5
ajeetraina wants to merge 20 commits intomainfrom
feature/testcontainers-integration

Conversation

@ajeetraina
Copy link
Owner

Testcontainers Implementation for Model Runner

This PR adds Testcontainers integration for both development and testing, specifically for working with the Docker Model Runner.

Changes

  1. Added dev_dependencies.go with build tag dev for development mode
  2. Created a Model Runner test using Testcontainers
  3. Updated go.mod to include Testcontainers dependency
  4. Added documentation for using Testcontainers

Benefits

  • Eliminates the need for multiple Docker Compose files
  • Provides a more programmatic approach to managing dependencies
  • Enables dynamic port allocation to avoid conflicts
  • Offers automated startup and graceful shutdown of dependencies
  • Uses the latest Testcontainers version (v0.35.0)

Usage

To run in development mode:

go run -tags dev .

To run the Model Runner test:

cd tests
go test -v ./integration -run TestModelRunnerIntegration

See TESTCONTAINERS_USAGE.md for full documentation.

Notes

This PR is intended for demonstration purposes and should be kept separate from the main branch for now as it represents an alternative approach to the current implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant