summaryrefslogtreecommitdiffstats
path: root/xci/playbooks/roles/prepare-functest/templates
diff options
context:
space:
mode:
authorFatih Degirmenci <fdegir@gmail.com>2018-04-12 11:21:36 +0200
committerFatih Degirmenci <fdegir@gmail.com>2018-04-14 18:07:20 +0200
commita4866825aafc744e861a3badb86df314bbf22f39 (patch)
tree39c721bee49bbcee7c67438cd6a2566858155652 /xci/playbooks/roles/prepare-functest/templates
parent4cac3ade71730cf08d3e80f8ae90297f264d26ca (diff)
Download only the needed images for OpenStack Functest Healthcheck
Some of the files needed by Functest are pretty big and it takes time to download them all so this change ensures that the files are needed by healthcheck is downloaded and the rest is not. Further changes are needed to make the list even smaller for smoke test but we need Functest guidance to identify which of them are needed for what testing. It could be done by having suite specific download_images.sh like download_images_healthcheck.sh, download_images_smoke.sh and so on. deploy-scenario:os-nosdn-nofeature installer-type:osa Change-Id: Ib2c5867adfad8097d1a084c39ad08cc4df2e4549 Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
Diffstat (limited to 'xci/playbooks/roles/prepare-functest/templates')
-rw-r--r--xci/playbooks/roles/prepare-functest/templates/run-functest.sh.j210
1 files changed, 9 insertions, 1 deletions
diff --git a/xci/playbooks/roles/prepare-functest/templates/run-functest.sh.j2 b/xci/playbooks/roles/prepare-functest/templates/run-functest.sh.j2
index 0f97c3b4..7856cb0e 100644
--- a/xci/playbooks/roles/prepare-functest/templates/run-functest.sh.j2
+++ b/xci/playbooks/roles/prepare-functest/templates/run-functest.sh.j2
@@ -43,7 +43,15 @@ openstack --insecure subnet create --network {{ external_network }} \
--subnet-range {{ subnet_cidr }} --gateway {{ gateway_ip }} \
--no-dhcp {{ subnet_name }}
-mkdir ~/images && cd ~/images && wget -q http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img && cd ~
+# the needed images differ between the suites so avoid downloading unnecessary images
+if [[ "$FUNCTEST_SUITE_NAME" =~ "healthcheck" ]]; then
+ mkdir ~/images && cd ~/images && wget -q http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img && cd ~
+elif [[ "$FUNCTEST_SUITE_NAME" =~ "smoke" ]]; then
+ mkdir -p images && wget -q -O- https://git.opnfv.org/functest/plain/functest/ci/download_images.sh | bash -s -- images && ls -1 images/*
+else
+ echo "Unsupported test suite for functest"
+ exit 1
+fi
# docker image to use will be different for healthcheck and smoke test
DOCKER_IMAGE_NAME="opnfv/functest-${FUNCTEST_SUITE_NAME}"