teleport/e2e/docker-compose.yaml
Jakub Nyckowski e1e0b79096
Add Playwright E2E tests boilerplates (#29286)
* Add end-to-end tests with Playwright

This commit introduces end-to-end tests with Docker Compose to improve code quality and provide a more robust testing environment. This involves adding a GitHub workflow for manually triggering the test suite, Makefile commands for running, the tests, and configurations. This addition will enable easier testing and provide a platform for future test development.

* Cleanup

* Only allow manual CI trigger

* Ignore e2e tests in Jest configuration

Added 'testPathIgnorePatterns' field to the Jest configuration in order to ignore end-to-end tests when running unit tests.

* Address code review comments

* Update e2e test environment for multi-architecture support

Modified the end-to-end test setup scripts and docker files to support both Linux and MacOS architectures. The build process now detects the system architecture and downloads the appropriate version of `mkcert`. Also, there is a control flow to build binaries only if they don't exist and the build files are now mounted from the build directory instead of being copied. These changes aim to make the e2e tests more robust and adaptable to different development environments.

* Update Makefile and teleport.yaml for testing improvements

Continued refinement of testing process by updating the Makefile and teleport.yaml. Changes to the Makefile include additional phony targets, modification of build-binaries, and a new 'all' target which runs key steps in sequence. The teleport.yaml file was updated to version v3.

* Fix makefile on MacOS

* Add Readme
2023-08-07 23:59:22 +00:00

38 lines
814 B
YAML

version: '3.8'
services:
teleport:
image: teleport-e2e:latest
hostname: teleport
build:
context: ..
dockerfile: ./e2e/config/Dockerfile
volumes:
- teleport-config:/etc/teleport
- ./config/teleport.yaml:/etc/teleport/teleport.yaml
- ./config/state.yaml:/etc/teleport/state.yaml
- teleport-data:/var/lib/teleport
- ../build/teleport:/usr/local/bin/teleport
ports:
- "3080:3080"
e2e:
image: mcr.microsoft.com/playwright:v1.36.0-jammy
entrypoint:
- bash
- -c
volumes:
- .:/e2e
- teleport-config:/etc/teleport
- teleport-data:/var/lib/teleport
environment:
- CI=1
working_dir: /e2e
command:
- /e2e/config/run-tests.sh
volumes:
teleport-config: {}
teleport-data: {}