summaryrefslogtreecommitdiff
path: root/ironic/tests/unit/api/controllers/v1/test_allocation.py
diff options
context:
space:
mode:
Diffstat (limited to 'ironic/tests/unit/api/controllers/v1/test_allocation.py')
-rw-r--r--ironic/tests/unit/api/controllers/v1/test_allocation.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/ironic/tests/unit/api/controllers/v1/test_allocation.py b/ironic/tests/unit/api/controllers/v1/test_allocation.py
index 39a12784e..60fcca0dc 100644
--- a/ironic/tests/unit/api/controllers/v1/test_allocation.py
+++ b/ironic/tests/unit/api/controllers/v1/test_allocation.py
@@ -192,7 +192,9 @@ class TestListAllocations(test_api_base.BaseApiTest):
self.assertEqual(3, len(data['allocations']))
next_marker = data['allocations'][-1]['uuid']
- self.assertIn(next_marker, data['next'])
+ self.assertIn('/allocations', data['next'])
+ self.assertIn('limit=3', data['next'])
+ self.assertIn(f'marker={next_marker}', data['next'])
def test_collection_links_default_limit(self):
cfg.CONF.set_override('max_limit', 3, 'api')
@@ -207,7 +209,10 @@ class TestListAllocations(test_api_base.BaseApiTest):
self.assertEqual(3, len(data['allocations']))
next_marker = data['allocations'][-1]['uuid']
- self.assertIn(next_marker, data['next'])
+ self.assertIn('/allocations', data['next'])
+ # FIXME(dtantsur): IMO this should not pass, but it does now
+ self.assertIn('limit=3', data['next'])
+ self.assertIn(f'marker={next_marker}', data['next'])
def test_collection_links_custom_fields(self):
cfg.CONF.set_override('max_limit', 3, 'api')
@@ -227,8 +232,9 @@ class TestListAllocations(test_api_base.BaseApiTest):
self.assertEqual(3, len(data['allocations']))
next_marker = data['allocations'][-1]['uuid']
- self.assertIn(next_marker, data['next'])
- self.assertIn('fields', data['next'])
+ self.assertIn('/allocations', data['next'])
+ self.assertIn(f'marker={next_marker}', data['next'])
+ self.assertIn(f'fields={fields}', data['next'])
def test_get_collection_pagination_no_uuid(self):
fields = 'node_uuid'