mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 23:17:32 -02:30
cleanup e2e test development tooling and add readme examples
This commit is contained in:
@@ -7,17 +7,26 @@ docker exec -i tools_awx_1 sh <<-EOSH
|
||||
make --directory=/awx_devel DATA_GEN_PRESET=e2e bulk_data
|
||||
EOSH
|
||||
|
||||
# run with with a live browser
|
||||
npm --prefix awx/ui run e2e -- --env=debug
|
||||
# run all of the tests with a live browser
|
||||
npm --prefix awx/ui run e2e
|
||||
|
||||
# run a subset of the tests
|
||||
npm --prefix awx/ui run e2e -- --filter="test-credentials*"
|
||||
|
||||
# setup a local webdriver cluster for test development
|
||||
docker-compose \
|
||||
-f awx/ui/client/test/e2e/cluster/docker-compose.yml \
|
||||
-f awx/ui/client/test/e2e/cluster/devel-override.yml \
|
||||
up --scale chrome=2 --scale firefox=0
|
||||
-f awx/ui/test/e2e/cluster/docker-compose.yml \
|
||||
-f awx/ui/test/e2e/cluster/docker-compose.devel-override.yml \
|
||||
up --scale chrome=2 hub chrome
|
||||
|
||||
# run headlessly with multiple workers on the cluster
|
||||
AWX_E2E_LAUNCH_URL='https://awx:8043' AWX_E2E_WORKERS=2 npm --prefix awx/ui run e2e
|
||||
# run headlessly on the cluster
|
||||
AWX_E2E_LAUNCH_URL='https://awx:8043' npm --prefix awx/ui run e2e -- --env=cluster
|
||||
|
||||
# run with multiple workers
|
||||
AWX_E2E_LAUNCH_URL='https://awx:8043' AWX_E2E_CLUSTER_WORKERS=2 \
|
||||
npm --prefix awx/ui run e2e -- --env=cluster --filter="test-*"
|
||||
```
|
||||
|
||||
**Note:** Unless overridden in [settings](settings.js), tests will run against `localhost:8043`.
|
||||
**Note:**
|
||||
- Unless overridden in [settings](settings.js), tests will run against `localhost:8043`.
|
||||
- Use `npm --prefix awx/ui run e2e -- --help` to see additional usage information for the test runner.
|
||||
|
||||
21
awx/ui/test/e2e/cluster/Dockerfile
Normal file
21
awx/ui/test/e2e/cluster/Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
FROM centos:7
|
||||
|
||||
RUN yum install -y epel-release
|
||||
|
||||
RUN yum install -y \
|
||||
bzip2 \
|
||||
gcc-c++ \
|
||||
git \
|
||||
make \
|
||||
nodejs \
|
||||
npm
|
||||
|
||||
WORKDIR /awx
|
||||
|
||||
COPY awx/ui/package.json awx/ui/package.json
|
||||
|
||||
RUN npm --prefix=awx/ui install
|
||||
|
||||
COPY awx/ui/test/e2e awx/ui/test/e2e
|
||||
|
||||
ENTRYPOINT ["npm", "--prefix=awx/ui", "run", "e2e", "--", "--env=cluster"]
|
||||
@@ -1,13 +0,0 @@
|
||||
---
|
||||
version: '2'
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: tools_default
|
||||
services:
|
||||
chrome:
|
||||
external_links:
|
||||
- 'tools_awx_1:awx'
|
||||
firefox:
|
||||
external_links:
|
||||
- 'tools_awx_1:awx'
|
||||
18
awx/ui/test/e2e/cluster/docker-compose.devel-override.yml
Normal file
18
awx/ui/test/e2e/cluster/docker-compose.devel-override.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
version: '2'
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: tools_default
|
||||
services:
|
||||
chrome:
|
||||
external_links:
|
||||
- tools_awx_1:awx
|
||||
firefox:
|
||||
external_links:
|
||||
- tools_awx_1:awx
|
||||
e2e:
|
||||
external_links:
|
||||
- tools_awx_1:awx
|
||||
environment:
|
||||
AWX_E2E_URL: https://awx:8043
|
||||
@@ -4,7 +4,7 @@ services:
|
||||
hub:
|
||||
image: selenium/hub
|
||||
ports:
|
||||
- '4444:4444'
|
||||
- 4444:4444
|
||||
chrome:
|
||||
image: selenium/node-chrome
|
||||
links:
|
||||
@@ -21,3 +21,17 @@ services:
|
||||
environment:
|
||||
HUB_PORT_4444_TCP_ADDR: hub
|
||||
HUB_PORT_4444_TCP_PORT: 4444
|
||||
e2e:
|
||||
image: awx_e2e
|
||||
build:
|
||||
context: ../../../../../
|
||||
dockerfile: awx/ui/test/e2e/cluster/Dockerfile
|
||||
depends_on:
|
||||
- chrome
|
||||
links:
|
||||
- hub
|
||||
volumes:
|
||||
- ..:/awx/awx/ui/test/e2e
|
||||
environment:
|
||||
AWX_E2E_CLUSTER_HOST: hub
|
||||
AWX_E2E_CLUSTER_PORT: 4444
|
||||
|
||||
Reference in New Issue
Block a user