Integration tests (#312)
* Add docker compose for running integration tests. Runs entry_node and arbitrary number of peers in docker network * Fix permission denied in container if run without mounting a `rw` volume making it possible to run as throw-away container. Remove `VOLUME` from Dockerfile as this only pollutes host system with anonymous volumes. * Use named network for easier external use * Add test container that discovers peers and waits for autopeering to happen * Fix min waitForNeighbors * Add go.sum * Run integration tests with Github Actions * Added framework that abstracts the docker network and provides convenience functionality * Update directory in Github Actions * Add bash script for automated local test execution * Add getMessageByHash endpoint * Adjust to merge changes * Add methods to easily do HTTP POST requests * Added relay message test * Increase client timeout * Verbose output for tests makes it easier to follow the execution * Introduce small API wrapper for GoShimmer HTTP API * Adjust relay test to use new API wrapper * WIP: Docker logs * Fix issue with serving visualizer analysis server of entry node * Persist logs of containers after CI run * Fix test file * Fix uploading of artifacts * Save all containers' logs as artifacts * Create logs files also with local run * Add possibility to retrieve logs from a peer via Docker logs * Make tester part of the goshimmer module to make code sharing possible * Use client/lib to make HTTP requests in tester * Fix unit test directory * Add comments/doc to the code * Add readme * Move tester to own module and don't build container but use existing golang one instead * Address PR comments * Adjust to merge * Only use 1 config file for all containers * go mod tidy * Rename client lib base url
Showing
- .github/workflows/integration-tests.yml 50 additions, 0 deletions.github/workflows/integration-tests.yml
- .github/workflows/test.yml 1 addition, 1 deletion.github/workflows/test.yml
- Dockerfile 1 addition, 3 deletionsDockerfile
- client/autopeering.go 1 addition, 1 deletionclient/autopeering.go
- client/lib.go 10 additions, 6 deletionsclient/lib.go
- client/message.go 1 addition, 1 deletionclient/message.go
- docker-compose.yml 1 addition, 1 deletiondocker-compose.yml
- images/integration-testing-setup.png 0 additions, 0 deletionsimages/integration-testing-setup.png
- plugins/analysis/webinterface/httpserver/packrd/packed-packr.go 12 additions, 13 deletions...s/analysis/webinterface/httpserver/packrd/packed-packr.go
- plugins/analysis/webinterface/httpserver/static/js/main.js 1 addition, 1 deletionplugins/analysis/webinterface/httpserver/static/js/main.js
- plugins/webapi/getMessageByHash/plugin.go 86 additions, 0 deletionsplugins/webapi/getMessageByHash/plugin.go
- tools/integration-tests/README.md 53 additions, 0 deletionstools/integration-tests/README.md
- tools/integration-tests/config.docker.json 73 additions, 0 deletionstools/integration-tests/config.docker.json
- tools/integration-tests/docker-compose.yml 51 additions, 0 deletionstools/integration-tests/docker-compose.yml
- tools/integration-tests/logs/.gitkeep 0 additions, 0 deletionstools/integration-tests/logs/.gitkeep
- tools/integration-tests/runTests.sh 32 additions, 0 deletionstools/integration-tests/runTests.sh
- tools/integration-tests/tester/docker-compose.yml 17 additions, 0 deletionstools/integration-tests/tester/docker-compose.yml
- tools/integration-tests/tester/framework/framework.go 99 additions, 0 deletionstools/integration-tests/tester/framework/framework.go
- tools/integration-tests/tester/framework/parameters.go 11 additions, 0 deletionstools/integration-tests/tester/framework/parameters.go
- tools/integration-tests/tester/framework/peer.go 102 additions, 0 deletionstools/integration-tests/tester/framework/peer.go
Loading
Please register or sign in to comment