Actions
Issue #1554
closedTests for pulp.server.managers.content.query cannot be run independently
Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:
Description
The tests for pulp.server.managers.content.query cannot be run independently:
$ time nosetests -sx server/test/unit/server/managers/content/test_query.py
...F
======================================================================
FAIL: test_get_by_key_dict (unit.server.managers.content.test_query.PulpContentQueryTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/vagrant/devel/pulp/server/test/unit/server/managers/content/test_query.py", line 74, in test_get_by_key_dict
TYPE_2_DEF.id, [self.type_2_ids[0]])[1][0]
File "/home/vagrant/devel/pulp/server/pulp/server/managers/content/query.py", line 204, in get_content_unit_keys
key_fields = units_controller.get_unit_key_fields_for_type(content_type)
File "/home/vagrant/devel/pulp/server/pulp/server/controllers/units.py", line 59, in get_unit_key_fields_for_type
model_class = plugin_api.get_unit_model_by_id(type_id)
File "/home/vagrant/devel/pulp/server/pulp/plugins/loader/api.py", line 308, in get_unit_model_by_id
assert _is_initialized()
AssertionError:
-------------------- >> begin captured logging << --------------------
pulp.plugins.types.database: INFO: Purging the database of all content type definitions and collections
pulp.plugins.types.database: INFO: Updating the database with types [type-1, type-2]
pulp.plugins.types.database: DEBUG: Ensuring index [key-1] (unique: True) on type definition [type-1]
pulp.plugins.types.database: DEBUG: Index [key-1_1] created on type definition [type-1]
pulp.plugins.types.database: DEBUG: Ensuring index [search-1] (unique: False) on type definition [type-1]
pulp.plugins.types.database: DEBUG: Index [search-1_1] created on type definition [type-1]
pulp.plugins.types.database: DEBUG: Ensuring index [key-2a, key-2b] (unique: True) on type definition [type-2]
pulp.plugins.types.database: DEBUG: Index [key-2a_1_key-2b_1] created on type definition [type-2]
pulp.plugins.types.database: INFO: Purging the database of all content type definitions and collections
--------------------- >> end captured logging << ---------------------
----------------------------------------------------------------------
Ran 4 tests in 1.179s
FAILED (failures=1)
real 0m2.764s
user 0m1.400s
sys 0m0.264s
However, they pass when run with the other manager tests:
$ time nosetests -sx server/test/unit/server/managers/
..............................................................................................................................................................................................................................................................................................................................................................................................................S....S......................................................................................................................
----------------------------------------------------------------------
Ran 522 tests in 30.846s
OK (SKIP=2)
real 0m33.595s
user 0m25.181s
sys 0m3.595s
Related issues
Updated by bmbouter almost 9 years ago
- Related to Refactor #132: Ensure all tests can be run independantly added
Updated by jortel@redhat.com almost 9 years ago
- Severity changed from 2. Medium to 1. Low
- Triaged changed from No to Yes
Updated by bmbouter over 5 years ago
- Status changed from NEW to CLOSED - WONTFIX
Updated by bmbouter over 5 years ago
Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.
Actions