teleport/e2e
Gavin Frazar 2cb26477f2
Add RDS Postgres end-to-end tests (#29755)
* test RDS database discovery
* test RDS postgres instance connection
* organize some common test helpers for eks/rds e2e tests
* exclude e2e tests from flaky test base step
* exclude e2e tests in other test flows
* skip e2e db tests by default via env var check
* add postgres web conn test
2023-08-16 22:37:20 +00:00
..
aws Add RDS Postgres end-to-end tests (#29755) 2023-08-16 22:37:20 +00:00
config Add Playwright E2E tests boilerplates (#29286) 2023-08-07 23:59:22 +00:00
tests Add Playwright E2E tests boilerplates (#29286) 2023-08-07 23:59:22 +00:00
.gitignore Add Playwright E2E tests boilerplates (#29286) 2023-08-07 23:59:22 +00:00
docker-compose.yaml Add Playwright E2E tests boilerplates (#29286) 2023-08-07 23:59:22 +00:00
Makefile Add Playwright E2E tests boilerplates (#29286) 2023-08-07 23:59:22 +00:00
package.json Add Playwright E2E tests boilerplates (#29286) 2023-08-07 23:59:22 +00:00
playwright.config.ts Add Playwright E2E tests boilerplates (#29286) 2023-08-07 23:59:22 +00:00
README.md Add Playwright E2E tests boilerplates (#29286) 2023-08-07 23:59:22 +00:00
yarn.lock Add Playwright E2E tests boilerplates (#29286) 2023-08-07 23:59:22 +00:00

Teleport E2E Tests

This directory contains end-to-end tests for Teleport. These tests are designed to be run against a live cluster. They are written in TS and use Playwright to interact with the browser. Docker compose is used to spin up a cluster for testing and to run the tests.

Running the tests

# Make all removes the existing docker volumes to ensure a clean state
# and rebuild the containers
make all 

or

# Only run tests
make test

MacOS building notes

Before running the tests on MacOS in Docker, you need to build Linux compatible binaries. Binaries are build using our Docker images inside build.assets directory. You can also build them manually using make build-binaries command.

Running tests for development

Docker compose setup is designed to run tests in CI and create the same environment locally, so debugging potential issues is easier. E2E tests make changes to the cluster, so the order of the tests is important. To run tests for development, you can use yarn test command to run the test against the existing cluster. yarn codegen starts the Playwright codegen tool that allows to record the test and generate the code for it. This improves the development speed as most code can be generated.

Common issues

Cannot run macOS (Mach-O) executable in Docker: Exec format error

This error means that you are trying to run MacOS binary on Linux. You need to build Linux compatible binaries to run them in Docker. You can rebuild them using make build-binaries or just remove existing binaries in ../build as they will be rebuilt automatically.