From 7e984a6644d85feae6bc7a7ebfc9dc186533b8fb Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Ollivier?= Date: Tue, 14 Oct 2025 13:40:53 +0200 Subject: [PATCH] Apply "Use the proper condition for volume encryption transfer tests" MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit https://github.com/openstack/cinder-tempest-plugin/commit/2b649c9cadd24c52e7d37cc29677dcae70e66de0 Change-Id: I890d0e1ce0ff07732fdb53f32fc9d5557ccf0aa9 Signed-off-by: Cédric Ollivier --- docker/smoke/Dockerfile | 7 +++-- ...per-condition-for-volume-encryption-trans.patch | 31 ++++++++++++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 docker/smoke/Use-the-proper-condition-for-volume-encryption-trans.patch diff --git a/docker/smoke/Dockerfile b/docker/smoke/Dockerfile index 39c561519..1f2821ea1 100644 --- a/docker/smoke/Dockerfile +++ b/docker/smoke/Dockerfile @@ -15,6 +15,7 @@ ARG HEAT_TEMPEST_TAG=1.7.0 ARG TELEMETRY_TEMPEST_TAG=1.8.0 ARG CYBORG_TEMPEST_TAG=2.1.0 +COPY Use-the-proper-condition-for-volume-encryption-trans.patch /tmp/Use-the-proper-condition-for-volume-encryption-trans.patch RUN apk --no-cache add --update libxml2 libxslt && \ apk --no-cache add --virtual .build-deps --update \ python3-dev build-base linux-headers libffi-dev \ @@ -36,7 +37,8 @@ RUN apk --no-cache add --update libxml2 libxslt && \ git init /src/cinder-tempest-plugin && \ (cd /src/cinder-tempest-plugin && \ git fetch --tags https://opendev.org/openstack/cinder-tempest-plugin.git $CINDER_TEMPEST_TAG && \ - git checkout FETCH_HEAD) && \ + git checkout FETCH_HEAD && \ + patch -p1 < /tmp/Use-the-proper-condition-for-volume-encryption-trans.patch) && \ update-requirements -s --source /src/requirements /src/cinder-tempest-plugin && \ git init /src/keystone-tempest-plugin && \ (cd /src/keystone-tempest-plugin && \ @@ -85,7 +87,8 @@ RUN apk --no-cache add --update libxml2 libxslt && \ rm -r /src/patrole /src/barbican-tempest-plugin /src/neutron-tempest-plugin \ /src/cinder-tempest-plugin /src/keystone-tempest-plugin \ /src/octavia-tempest-plugin /src/heat-tempest-plugin \ - /src/telemetry-tempest-plugin /src/cyborg-tempest-plugin && \ + /src/telemetry-tempest-plugin /src/cyborg-tempest-plugin \ + /tmp/Use-the-proper-condition-for-volume-encryption-trans.patch && \ apk del .build-deps COPY compute.txt /home/opnfv/functest/data/refstack/compute.txt COPY object.txt /home/opnfv/functest/data/refstack/object.txt diff --git a/docker/smoke/Use-the-proper-condition-for-volume-encryption-trans.patch b/docker/smoke/Use-the-proper-condition-for-volume-encryption-trans.patch new file mode 100644 index 000000000..4ad42027f --- /dev/null +++ b/docker/smoke/Use-the-proper-condition-for-volume-encryption-trans.patch @@ -0,0 +1,31 @@ +From 2b649c9cadd24c52e7d37cc29677dcae70e66de0 Mon Sep 17 00:00:00 2001 +From: Luigi Toscano +Date: Fri, 20 Sep 2024 22:10:13 +0200 +Subject: [PATCH] Use the proper condition for volume encryption transfer tests + +Like all other volume encryption tests (with attachment or boot +from volume), make sure that also the volume encryption transfer +tests are executed only when the appropriate configuration key +(compute_feature_enabled.attach_encrypted_volume) is set. + +Change-Id: I21014b915dbecd0abaabb214f18f5241cc7c5b47 +--- + .../scenario/test_encrypted_volume_transfer.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/cinder_tempest_plugin/scenario/test_encrypted_volume_transfer.py b/cinder_tempest_plugin/scenario/test_encrypted_volume_transfer.py +index 7232433..bfe33b2 100644 +--- a/cinder_tempest_plugin/scenario/test_encrypted_volume_transfer.py ++++ b/cinder_tempest_plugin/scenario/test_encrypted_volume_transfer.py +@@ -41,6 +41,8 @@ class TransferEncryptedVolumeTest(manager.EncryptionScenarioTest): + @classmethod + def skip_checks(cls): + super(TransferEncryptedVolumeTest, cls).skip_checks() ++ if not CONF.compute_feature_enabled.attach_encrypted_volume: ++ raise cls.skipException('Encrypted volume attach is not supported') + if not CONF.service_available.barbican: + raise cls.skipException('Barbican is required') + +-- +2.51.0 + -- 2.16.6