Cannot unit test the uniqueness constraint in share and group types models
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Shared File Systems Service (Manila) |
Triaged
|
Low
|
Unassigned |
Bug Description
This bug is a result of the code review iterations on https:/
There was a unit test added to check that, when a share type with name "ABC" exists, another share type's name cannot be updated to be "ABC". This collision in names is guarded by uniqueness constraints in the "share_types" and "share_group_types" tables [1][2][3][4].
However, unit tests run on Sqlite, and this constraint isn't holding.
The unit test that failed: https:/
manila/
def test_share_
share_type = db_utils.
values = {"name": "exist_name"}
Failure observed in the unit tests:
Captured traceback:
~~~
Traceback (most recent call last):
File "manila/
self.ctxt, share_type['id'], values)
File "/home/
File "/home/
raise mismatch_error
testtools.
[1] https:/
[2] https:/
[3] https:/
[4] https:/
tags: | added: low-hanging-fruit tests unit |
Changed in manila: | |
importance: | Undecided → Low |
description: | updated |
tags: | removed: low-hanging-fruit unit |
Changed in manila: | |
status: | New → Triaged |
tags: | added: low-hanging-fruit |
Hello, I would love to work on this issue,hopefully its still open