Created Files:
docker/docker-compose.e2e.yml- Docker Compose configuration for e2e environmentdocker/e2e/dmsg-server.json- DMSG server configuration with fixed keysdocker/images/dmsg-client/Dockerfile- Client container with dmsg utilities and test server.dockerignore- Docker build optimization
Services:
- Redis (172.20.0.2:6379) - Discovery backend
- DMSG Discovery (172.20.0.3:9090) - Running in test mode
- DMSG Server (172.20.0.4:8080) - Routing server
- DMSG Client (172.20.0.5) - Test container with utilities
Created Files:
internal/e2e/e2e_test.go- Main test suite with 6 test casesinternal/e2e/testserver/main.go- Simple HTTP server for testinginternal/e2e/README.md- E2E tests documentation
Test Cases:
TestDiscoveryIsRunning- Verify discovery service is runningTestDmsgServerIsRunning- Verify dmsg server is runningTestDmsgCurlBasic- Test dmsg curl functionality end-to-endTestDmsgWebProxy- Test dmsg web SOCKS5 proxy startupTestVersionFieldPresent- CRITICAL regression test for version field bugTestDmsgCurlToDiscovery- Test querying discovery API
Created Files:
scripts/run-e2e-tests.sh- Automated test runner scriptE2E_TESTING.md- Comprehensive documentation
Modified Files:
Makefile- Addedtest-e2etarget and updated.PHONY
Created Files:
E2E_TESTING.md- Complete guide to e2e testing frameworkinternal/e2e/README.md- Quick reference for test developers
The most important test is TestVersionFieldPresent, which validates the fix from commit caca20b5. This test:
- Executes
dmsg curl -Z(HTTP discovery mode) - Would fail with "entry validation error: entry has no version" before the fix
- Ensures Entry structs in multiple files include the required version field
- Prevents regression of this critical bug
Following the skywire e2e test pattern:
- Docker-based isolated environment
- Local deployment (not production services)
- Tests client applications using the protocol
- CI-ready with build tags
Tests cover the main dmsg client utilities:
dmsg curl- Downloads over DMSGdmsg web- SOCKS5 proxydmsg web srv- HTTP over DMSG server
cd ../dmsg
make test-e2eOr manually:
./scripts/run-e2e-tests.shcd dmsg
./scripts/run-e2e-tests.shThe tests are tagged with !no_ci and will be included in CI builds.
dmsg/
├── docker/
│ ├── docker-compose.e2e.yml # E2E environment definition
│ ├── e2e/
│ │ └── dmsg-server.json # Server config
│ └── images/
│ └── dmsg-client/
│ └── Dockerfile # Client container image
├── internal/
│ └── e2e/
│ ├── e2e_test.go # Test suite
│ ├── README.md # Quick reference
│ └── testserver/
│ └── main.go # HTTP test server
├── scripts/
│ └── run-e2e-tests.sh # Test runner
├── E2E_TESTING.md # Full documentation
├── .dockerignore # Docker build optimization
└── Makefile # Added test-e2e target
To verify the implementation:
-
Build the Docker images:
cd docker docker-compose -f docker-compose.e2e.yml build -
Run the tests:
cd .. make test-e2e -
If needed, debug with:
cd docker docker-compose -f docker-compose.e2e.yml up # In another terminal: go test -v -tags !no_ci ./internal/e2e/...
This e2e testing framework will:
- Catch bugs like the recent version field issue automatically
- Provide confidence in dmsg client utilities functionality
- Enable safer refactoring and feature development
- Match the quality standards set by skywire's testing
- Support CI/CD automation