Add os-test-images support in lib/tempest

This generates the test images in os-test-images and also configures
tempest to know where it is (and if image conversion is enabled in
glance).

Change-Id: Ib74002828a77838ab95d2322e92bdab68caac37c
This commit is contained in:
Dan Smith 2024-07-31 19:04:08 +00:00
parent b2c406f497
commit 84ce1984b1
2 changed files with 18 additions and 0 deletions

View File

@ -510,6 +510,7 @@
- opendev.org/openstack/nova
- opendev.org/openstack/placement
- opendev.org/openstack/swift
- opendev.org/openstack/os-test-images
timeout: 7200
vars:
# based on observation of the integrated gate

View File

@ -105,6 +105,10 @@ TEMPEST_CONCURRENCY=${TEMPEST_CONCURRENCY:-$(nproc)}
TEMPEST_FLAVOR_RAM=${TEMPEST_FLAVOR_RAM:-192}
TEMPEST_FLAVOR_ALT_RAM=${TEMPEST_FLAVOR_ALT_RAM:-256}
OSTESTIMAGES_REPO=${OSTESTIMAGES_REPO:-${GIT_BASE}/openstack/os-test-images.git}
OSTESTIMAGES_BRANCH=${OSTESTIMAGES_BRANCH:-$BRANCHLESS_TARGET_BRANCH}
OSTESTIMAGES_DIR=${DEST}/os-test-images
# Functions
# ---------
@ -357,6 +361,19 @@ function configure_tempest {
fi
fi
if is_service_enabled glance; then
git_clone $OSTESTIMAGES_REPO $OSTESTIMAGES_DIR $OSTESTIMAGES_BRANCH
pushd $OSTESTIMAGES_DIR
tox -egenerate
popd
iniset $TEMPEST_CONFIG image images_manifest_file ${OSTESTIMAGES_DIR}/images/manifest.yaml
local image_conversion
image_conversion=$(iniget $GLANCE_IMAGE_IMPORT_CONF image_conversion output_format)
if [[ "$image_conversion" ]]; then
iniset $TEMPEST_CONFIG image-feature-enabled image_conversion True
fi
fi
iniset $TEMPEST_CONFIG network project_network_cidr $FIXED_RANGE
ssh_connect_method=${TEMPEST_SSH_CONNECT_METHOD:-$ssh_connect_method}