Add api-ref tests to check url and parameter for importing backups

Bug #1940669 reported by Sofia Enriquez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
In Progress
Wishlist
Unassigned

Bug Description

Because of https://bugs.launchpad.net/cinder/+bug/1930526 we can see that the API URL of Import a backup is wrong. This is an important issue because we could have catched this if we had had a test to converge this.
In order to solve this we need to add unit/funtional tests to validate the request path of Import a backup.

description: updated
Changed in cinder:
importance: Undecided → Wishlist
Revision history for this message
Stephan Pampel (stephanpampel) wrote :

I can see that the tests already use the correct url (/v3/%project/backups/import_record), e.g here: https://opendev.org/openstack/cinder/src/branch/master/cinder/tests/unit/api/contrib/test_backups.py#L2042

In https://bugs.launchpad.net/cinder/+bug/1930526 the documentation was out-of-sync with the code/tests.

I do not understand from this ticket which kind of test could have prevented the documentation bug. Or which other test could be added to improve this. Can you please clarify what test(s) could be added to improve this?

Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :

@stephan: we have some functional tests whose purpose is to make sure that that api-ref is in sync with the actual code, but not all API calls are covered. They live here:

https://opendev.org/openstack/cinder/src/branch/master/cinder/tests/functional/api_sample_tests

summary: - Add unit tests to check url and parameter for importing backups
+ Add api-ref tests to check url and parameter for importing backups
Revision history for this message
Stephan Pampel (stephanpampel) wrote :

Personal opinion: Wouldn't it be better if the reference documentation was generated from the code directly? This would avoid it getting out of date and having to maintain these docs + the test for the docs. The examples should probably moved to how-to guides to follow https://diataxis.fr/.

chenwei (chenwei110)
Changed in cinder:
assignee: nobody → chenwei (chenwei110)
Revision history for this message
Haleema Khan (hsadia538) wrote :

I see it assigned to someone but no further activity. Is this ok if I assign it to myself? I an unable to tag the last asignee.

Revision history for this message
Sofia Enriquez (lsofia-enriquez) wrote :

The bug doesn't have any fixes. Because of that, I think the answer is Yes Haleema Khan. Feel free to work on this one :) Thanks!!

Revision history for this message
James Shameh Faith (devfate) wrote :

helo @hsadi538 and @chenwei are you working on the bug or it's open?

Changed in cinder:
assignee: chenwei (chenwei110) → Haleema Khan (hsadia538)
Revision history for this message
Haleema Khan (hsadia538) wrote :

Thank you for assigning!

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

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

Changed in cinder:
status: New → In Progress
Changed in cinder:
assignee: Haleema Khan (hsadia538) → nobody
Revision history for this message
Ajay Pal (ajoo7) wrote :

Hi Sofia,
Can I start working on this bug?

Ajay Pal (ajoo7)
Changed in cinder:
assignee: nobody → Ajay Pal (ajoo7)
Revision history for this message
Ajay Pal (ajoo7) wrote :

Hi Sofia,
I can see that Haleema khan has proposed a lot of LGMT changes and just require addressing a few comments. Shouldn't we proceed from where this issue is left?

Changed in cinder:
assignee: Ajay Pal (ajoo7) → nobody
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.