summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorramishra <ramishra@redhat.com>2021-07-30 09:23:05 +0530
committerTakashi Kajinami <tkajinam@redhat.com>2022-06-15 21:30:38 +0900
commit87b40ed75ea4d8f91db3d7dbec236adeb9516020 (patch)
treec3884ec225111243becc1bf35b0e189528d5fe6a
parent26a20de88c0b578422e9847c1210d10f10b04854 (diff)
downloadheat-87b40ed75ea4d8f91db3d7dbec236adeb9516020.tar.gz
Use constraints when creating tempest venv
When running tempest we run in-tree tests as well. Lots of these tests including tempest tests may not work with new client libraries. Let's use the relevant branch upper constraints when running functional tests. Backport note: Change I7d1017bcd7147329c4e187336daee1a1ae280fa9, which replaced f33 by f66, is merged into this backport to unblock CI. Change-Id: I6a8cffdc86c895eebe4269c5cd37841325566c54 (cherry picked from commit 22c48f57bb29ed62a8c3249ab953043cfd2617d3) (cherry picked from commit b95e6025f61417e7abc24a26d991bd26c57ee444) (cherry picked from commit 92db02a56e85dd5f890160217a16dc99394b927d) (cherry picked from commit d05b683ef65996ae5d1d6cc31d547169669abf45)
-rw-r--r--.zuul.yaml3
-rw-r--r--devstack/lib/heat6
-rw-r--r--doc/source/getting_started/on_devstack.rst4
-rwxr-xr-xheat_integrationtests/cleanup_test_env.sh2
-rwxr-xr-xheat_integrationtests/prepare_test_env.sh2
-rw-r--r--roles/run-heat-tests/defaults/main.yaml3
-rw-r--r--roles/run-heat-tests/tasks/main.yaml23
7 files changed, 33 insertions, 10 deletions
diff --git a/.zuul.yaml b/.zuul.yaml
index 802750c1f..1f23dbe73 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -75,7 +75,7 @@
minimal_image_ref: ${DEFAULT_IMAGE_NAME:-cirros-0.3.6-x86_64-disk}
instance_type: m1.heat_int
minimal_instance_type: m1.heat_micro
- image_ref: Fedora-Cloud-Base-33-1.2.x86_64
+ image_ref: Fedora-Cloud-Base-36-1.5.x86_64
hidden_stack_tag: hidden
heat_config_notify_script: /opt/stack/heat-agents/heat-config/bin/heat-config-notify
boot_config_env: /opt/stack/heat-templates/hot/software-config/boot-config/test_image_env.yaml
@@ -140,6 +140,7 @@
- opendev.org/openstack/heat
- opendev.org/openstack/heat-tempest-plugin
- opendev.org/openstack/python-heatclient
+ voting: false
vars:
configure_swap_size: 8192
devstack_services:
diff --git a/devstack/lib/heat b/devstack/lib/heat
index c237d9610..65088482b 100644
--- a/devstack/lib/heat
+++ b/devstack/lib/heat
@@ -453,7 +453,7 @@ function configure_tempest_for_heat {
# Skip LoadBalancerv2Test as deprecated neutron-lbaas service is not enabled
iniset $TEMPEST_CONFIG heat_plugin skip_functional_test_list 'LoadBalancerv2Test, NotificationTest'
- openstack flavor show m1.heat_int || openstack flavor create m1.heat_int --ram 512 --disk 4
+ openstack flavor show m1.heat_int || openstack flavor create m1.heat_int --ram 512 --disk 10
openstack flavor show m1.heat_micro || openstack flavor create m1.heat_micro --ram 128 --disk 1
source $TOP_DIR/openrc demo demo
@@ -482,14 +482,14 @@ function configure_tempest_for_heat {
source /etc/ci/mirror_info.sh
fi
HEAT_TEST_FEDORA_IMAGE_UPSTREAM=https://download.fedoraproject.org/pub/fedora/linux
- HEAT_TEST_FEDORA_IMAGE_PATH=releases/33/Cloud/x86_64/images/Fedora-Cloud-Base-33-1.2.x86_64.qcow2
+ HEAT_TEST_FEDORA_IMAGE_PATH=releases/36/Cloud/x86_64/images/Fedora-Cloud-Base-36-1.5.x86_64.qcow2
if curl --output /dev/null --silent --head --fail "${NODEPOOL_FEDORA_MIRROR}/${HEAT_TEST_FEDORA_IMAGE_PATH}"; then
export HEAT_TEST_FEDORA_IMAGE="${NODEPOOL_FEDORA_MIRROR}/${HEAT_TEST_FEDORA_IMAGE_PATH}"
else
export HEAT_TEST_FEDORA_IMAGE="${HEAT_TEST_FEDORA_IMAGE_UPSTREAM}/${HEAT_TEST_FEDORA_IMAGE_PATH}"
fi
TOKEN=$(openstack token issue -c id -f value)
- local image_exists=$( openstack image list | grep "Fedora-Cloud-Base-33-1.2.x86_64" )
+ local image_exists=$( openstack image list | grep "Fedora-Cloud-Base-36-1.5.x86_64" )
if [[ -z $image_exists ]]; then
if is_service_enabled g-api; then
upload_image $HEAT_TEST_FEDORA_IMAGE $TOKEN
diff --git a/doc/source/getting_started/on_devstack.rst b/doc/source/getting_started/on_devstack.rst
index 29581390d..64d607ab2 100644
--- a/doc/source/getting_started/on_devstack.rst
+++ b/doc/source/getting_started/on_devstack.rst
@@ -51,8 +51,8 @@ a VM image that heat can launch. To do that add the following to
`[[local|localrc]]` section of `local.conf`::
IMAGE_URL_SITE="https://download.fedoraproject.org"
- IMAGE_URL_PATH="/pub/fedora/linux/releases/33/Cloud/x86_64/images/"
- IMAGE_URL_FILE="Fedora-Cloud-Base-33-1.2.x86_64.qcow2"
+ IMAGE_URL_PATH="/pub/fedora/linux/releases/36/Cloud/x86_64/images/"
+ IMAGE_URL_FILE="Fedora-Cloud-Base-36-1.5.x86_64.qcow2"
IMAGE_URLS+=","$IMAGE_URL_SITE$IMAGE_URL_PATH$IMAGE_URL_FILE
URLs for any cloud image may be specified, but fedora images from F20 contain
diff --git a/heat_integrationtests/cleanup_test_env.sh b/heat_integrationtests/cleanup_test_env.sh
index 12791c9fd..8cc5fb1ce 100755
--- a/heat_integrationtests/cleanup_test_env.sh
+++ b/heat_integrationtests/cleanup_test_env.sh
@@ -30,4 +30,4 @@ openstack flavor delete m1.heat_int
openstack flavor delete m1.heat_micro
# delete the image created
-openstack image delete Fedora-Cloud-Base-33-1.2.x86_64
+openstack image delete Fedora-Cloud-Base-36-1.5.x86_64
diff --git a/heat_integrationtests/prepare_test_env.sh b/heat_integrationtests/prepare_test_env.sh
index 45b86e493..d4e440f73 100755
--- a/heat_integrationtests/prepare_test_env.sh
+++ b/heat_integrationtests/prepare_test_env.sh
@@ -46,7 +46,7 @@ function _config_iniset {
iniset $conf_file heat_plugin instance_type m1.heat_int
iniset $conf_file heat_plugin minimal_instance_type m1.heat_micro
- iniset $conf_file heat_plugin image_ref Fedora-Cloud-Base-33-1.2.x86_64
+ iniset $conf_file heat_plugin image_ref Fedora-Cloud-Base-36-1.5.x86_64
iniset $conf_file heat_plugin minimal_image_ref $default_image_name
iniset $conf_file heat_plugin hidden_stack_tag hidden
diff --git a/roles/run-heat-tests/defaults/main.yaml b/roles/run-heat-tests/defaults/main.yaml
index b601d49d9..22ce4a490 100644
--- a/roles/run-heat-tests/defaults/main.yaml
+++ b/roles/run-heat-tests/defaults/main.yaml
@@ -1,2 +1,5 @@
devstack_base_dir: /opt/stack
tempest_test_timeout: ''
+tempest_tox_environment: {}
+heat_tempest_plugin: /opt/stack/heat-tempest-plugin
+constraints_file: /opt/stack/requirements/upper-constraints.txt
diff --git a/roles/run-heat-tests/tasks/main.yaml b/roles/run-heat-tests/tasks/main.yaml
index 75122f2a1..4af1d0e03 100644
--- a/roles/run-heat-tests/tasks/main.yaml
+++ b/roles/run-heat-tests/tasks/main.yaml
@@ -1,3 +1,23 @@
+- name: Set OS_TEST_TIMEOUT if requested
+ set_fact:
+ tempest_tox_environment: "{{ tempest_tox_environment | combine({'OS_TEST_TIMEOUT': tempest_test_timeout}) }}"
+ when: tempest_test_timeout != ''
+
+- name: Set TOX_CONSTRAINTS_FILE
+ set_fact:
+ tempest_tox_environment: "{{ tempest_tox_environment | combine({'UPPER_CONSTRAINTS_FILE': constraints_file}) | combine({'TOX_CONSTRAINTS_FILE': constraints_file}) }}"
+
+- name: Allow git to read plugin directories
+ become: true
+ command: git config --system --add safe.directory {{heat_tempest_plugin}}
+
+- name: Install plugins
+ command: tox -evenv-tempest -- pip install -c{{constraints_file}} {{heat_tempest_plugin}}
+ become: true
+ args:
+ chdir: "{{devstack_base_dir}}/tempest"
+ environment: "{{ tempest_tox_environment }}"
+
- name: Run heat tests
command: tox -evenv-tempest -- stestr --test-path={{devstack_base_dir}}/heat/heat_integrationtests \
--top-dir={{devstack_base_dir}}/heat \
@@ -5,5 +25,4 @@
args:
chdir: "{{devstack_base_dir}}/tempest"
become: true
- become_user: tempest
- environment: '{{ {"OS_TEST_TIMEOUT": tempest_test_timeout} if tempest_test_timeout else {} }}'
+ environment: "{{ tempest_tox_environment }}"