Add test for list snapshots with offset param
This patch is to add test for list snapshots with offset param.
Change-Id: I1f151e9181161e9fa3c3762270eeb2dc42e468f7
diff --git a/tempest/api/volume/test_volumes_snapshots_list.py b/tempest/api/volume/test_volumes_snapshots_list.py
index f12bfd8..8a416ea 100644
--- a/tempest/api/volume/test_volumes_snapshots_list.py
+++ b/tempest/api/volume/test_volumes_snapshots_list.py
@@ -160,3 +160,11 @@
# marker(second snapshot), therefore only the first snapshot
# should displayed.
self.assertEqual(snapshot_id_list[:1], fetched_list_id)
+
+ @decorators.idempotent_id('ca96d551-17c6-4e11-b0e8-52d3bb8a63c7')
+ def test_snapshot_list_param_offset(self):
+ params = {'offset': 2, 'limit': 3}
+ snap_list = self.snapshots_client.list_snapshots(**params)['snapshots']
+ # Verify the list of snapshots skip offset=2 from the first element
+ # (total 3 elements), therefore only one snapshot should display
+ self.assertEqual(1, len(snap_list))