summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-11-22 21:49:05 +0000
committerGerrit Code Review <review@openstack.org>2018-11-22 21:49:05 +0000
commitfdb1c71b27ab6b88aec5b6be3da3f1438ecd7770 (patch)
treee2f6c2ddcf410e5798848090ab3ca9194da3a80c
parentc5156af3e613e9d471e3ff3dca6a4a44be5c81fc (diff)
parent7ff41dea0ea397287cc8eff6f19cf66a317f7bd7 (diff)
Merge "Add option to install chrome when running tempest"
-rw-r--r--roles/validate-tempest/README.md3
-rw-r--r--roles/validate-tempest/defaults/main.yml4
-rw-r--r--roles/validate-tempest/templates/run-tempest.sh.j27
3 files changed, 13 insertions, 1 deletions
diff --git a/roles/validate-tempest/README.md b/roles/validate-tempest/README.md
index a241cc6..4eaef14 100644
--- a/roles/validate-tempest/README.md
+++ b/roles/validate-tempest/README.md
@@ -62,7 +62,8 @@ Role Variables
62* `tempest_deployer_input_file`: <file path> The path to tripleo deployer input file which contains the pre configured 62* `tempest_deployer_input_file`: <file path> The path to tripleo deployer input file which contains the pre configured
63 configuration for the deployed cloud using TripleO. 63 configuration for the deployed cloud using TripleO.
64* `tempest_os_cloud`: <string> String name of the cloud to export as OS_CLOUD when using clouds.yaml rather than stackrc 64* `tempest_os_cloud`: <string> String name of the cloud to export as OS_CLOUD when using clouds.yaml rather than stackrc
65* `stackviz_tarball`: <string> Stackviz tarball url to be installed via pip 65* `tempest_use_headless_chrome`: true/false - whether the headless chrome docker container should be pulled, and run
66* `tempest_headless_chrome_port`: <int> - the entrypoint into the headless chrome container
66 67
67 68
68Skip tests file 69Skip tests file
diff --git a/roles/validate-tempest/defaults/main.yml b/roles/validate-tempest/defaults/main.yml
index 5470aad..86efd82 100644
--- a/roles/validate-tempest/defaults/main.yml
+++ b/roles/validate-tempest/defaults/main.yml
@@ -99,3 +99,7 @@ tempest_conf_removal_queens:
99 network-feature-enabled.api_extensions: dvr 99 network-feature-enabled.api_extensions: dvr
100tempest_os_cloud: "" 100tempest_os_cloud: ""
101stackviz_tarball: "https://tarballs.openstack.org/package-stackviz-element/stackviz-latest.tar.gz" 101stackviz_tarball: "https://tarballs.openstack.org/package-stackviz-element/stackviz-latest.tar.gz"
102
103# Headless Chrome configuration
104tempest_use_headless_chrome: false
105tempest_headless_chrome_port: 9999
diff --git a/roles/validate-tempest/templates/run-tempest.sh.j2 b/roles/validate-tempest/templates/run-tempest.sh.j2
index d222fed..e84c232 100644
--- a/roles/validate-tempest/templates/run-tempest.sh.j2
+++ b/roles/validate-tempest/templates/run-tempest.sh.j2
@@ -73,6 +73,13 @@ export CONTAINER_BINARY='docker'
73 73
74sudo $CONTAINER_BINARY pull {{ tempest_container_registry }}/{{ tempest_container_namespace }}:{{ tempest_container_tag }} 74sudo $CONTAINER_BINARY pull {{ tempest_container_registry }}/{{ tempest_container_namespace }}:{{ tempest_container_tag }}
75 75
76{% if tempest_use_headless_chrome|bool %}
77docker pull selenium/standalone-chrome
78docker run -d \
79 -p {{ tempest_headless_chrome_port }}:{{ tempest_headless_chrome_port }} \
80 -v /dev/shm:/dev/shm selenium/standalone-chrome
81{% endif %}
82
76# Run tempest container using docker mouting required files 83# Run tempest container using docker mouting required files
77sudo $CONTAINER_BINARY run --net=host -i -v $TEMPEST_HOST_DATA:{{ tempest_data }} \ 84sudo $CONTAINER_BINARY run --net=host -i -v $TEMPEST_HOST_DATA:{{ tempest_data }} \
78 -e PYTHONWARNINGS="${PYTHONWARNINGS:-}" \ 85 -e PYTHONWARNINGS="${PYTHONWARNINGS:-}" \