Apply "Use the proper condition for volume encryption transfer tests" 25/75025/1
authorCédric Ollivier <cedric.ollivier@orange.com>
Tue, 14 Oct 2025 11:40:53 +0000 (13:40 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Tue, 14 Oct 2025 11:43:02 +0000 (13:43 +0200)
https://github.com/openstack/cinder-tempest-plugin/commit/2b649c9cadd24c52e7d37cc29677dcae70e66de0

Change-Id: I890d0e1ce0ff07732fdb53f32fc9d5557ccf0aa9
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
docker/smoke/Dockerfile
docker/smoke/Use-the-proper-condition-for-volume-encryption-trans.patch [new file with mode: 0644]

index 39c5615..1f2821e 100644 (file)
@@ -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 (file)
index 0000000..4ad4202
--- /dev/null
@@ -0,0 +1,31 @@
+From 2b649c9cadd24c52e7d37cc29677dcae70e66de0 Mon Sep 17 00:00:00 2001
+From: Luigi Toscano <ltoscano@redhat.com>
+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
+