tempest does not ignore snapshot tests

Bug #1938529 reported by Vladislav Belogrudov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
Martin Kopec

Bug Description

If snapshots are disabled (e.g. NFS driver) tempest still runs a subset of snapshot tests and therefore fails.

Environment: NFS driver with nfs_snapshot_support disabled.
Tempest:
[volume-feature-enabled]
# Runs Cinder volume snapshot test (boolean value)
snapshot = false

[compute-feature-enabled]
# Does the test environment support creating snapshot images of
# running instances? (boolean value)
snapshot = false

Sample error:
<b>19:35:56</b> {1} tearDownClass (tempest.api.compute.volumes.test_attach_volume.AttachVolumeMultiAttachTest) [0.000000s] ... FAILED
<b>19:36:18</b> {0} tearDownClass (tempest.api.volume.admin.test_volume_retype.VolumeRetypeWithMigrationTest) [0.000000s] ... FAILED

It looks like not all test suites have checks like these:
~/src/openstack/tempest> egrep -r 'not (CONF.compute_feature_enabled.snapshot|CONF.volume_feature_enabled.snapshot)' *
tempest/scenario/test_snapshot_pattern.py: if not CONF.compute_feature_enabled.snapshot:
tempest/scenario/test_stamp_pattern.py: if not CONF.volume_feature_enabled.snapshot:
Binary file tempest/api/compute/volumes/.test_volume_snapshots.py.swp matches

Revision history for this message
Martin Kopec (mkopec) wrote :

The related tests:

$ tempest run -l | grep test_snapshot_volume_backed_multiattach
tempest.api.compute.volumes.test_attach_volume.AttachVolumeMultiAttachTest.test_snapshot_volume_backed_multiattach[id-885ac48a-2d7a-40c5-ae8b-1993882d724c,image]

$ tempest run -l | grep test_volume_from_snapshot_retype_with_migration
tempest.api.volume.admin.test_volume_retype.VolumeRetypeWithMigrationTest.test_volume_from_snapshot_retype_with_migration[id-d0d9554f-e7a5-4104-8973-f35b27ccb60d]

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/tempest/+/808909

Changed in tempest:
status: New → In Progress
Martin Kopec (mkopec)
Changed in tempest:
assignee: nobody → Martin Kopec (mkopec)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.opendev.org/c/openstack/tempest/+/808909
Committed: https://opendev.org/openstack/tempest/commit/a54417270b11e65550acc4700cf8edf142f6ee60
Submitter: "Zuul (22348)"
Branch: master

commit a54417270b11e65550acc4700cf8edf142f6ee60
Author: Martin Kopec <email address hidden>
Date: Tue Sep 14 08:13:13 2021 +0000

    Skip snaphost tests unless snapshot feature is enabled

    2 tests perfoming a volume and server snapshot weren't skipped
    when the snapshot features were disabled:

    CONF.volume_feature_enabled.snapshot
    CONF.compute_feature_enabled.snapshot

    Closes-Bug: #1938529
    Change-Id: If7621e5ad982f43777ad3354d48ac8235420d1c6

Changed in tempest:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tempest 29.1.0

This issue was fixed in the openstack/tempest 29.1.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.