Issue #1393
closedFailing unit tests after fc23 update
Description
Traceback (most recent call last):
File "/home/vagrant/.virtualenvs/pulp/lib/python2.7/site-packages/mock.py", line 1201, in patched
return func(*args, **keywargs)
File "/home/vagrant/devel/pulp/server/test/unit/server/db/migrations/test_0015_load_content_types.py", line 96, in test_migrate
self.assertEqual(indexes['attribute_1_1_attribute_2_1_attribute_3_1']['dropDups'], False)
KeyError: 'dropDups'
Traceback (most recent call last):
File "/home/vagrant/.virtualenvs/pulp/lib/python2.7/site-packages/mock.py", line 1201, in patched
return func(*args, **keywargs)
File "/home/vagrant/devel/pulp/server/test/unit/server/db/test_manage.py", line 351, in test_pulp_manage_db_loads_types
self.assertEqual(indexes['attribute_1_1_attribute_2_1_attribute_3_1']['dropDups'], False)
KeyError: 'dropDups'
dropDups was deprecated in 2.6 but removed in 2.7, but it looks like we don't use it, and probably don't actually need to check for it...
Added by semyers about 8 years ago
Added by semyers about 8 years ago
Revision aad4d3a9 | View on GitHub
drop checks for dropDups
The upgrade to fedora 23 revealed that the 'dropDups' property of mongo indices was deprecated in 2.6 and removed in 2.7[0].
The removed 'dropDups' assertions weren't stricly necessary, since the test is checking that the uniqueness contraint is applied, which it is.
dropDups only comes into play if it's explicitly requested, which we never do.
https://pulp.plan.io/issues/1393
fixes #1393
Updated by semyers about 8 years ago
We do specify dropDups in one place[0], but set it to False, which is the default[1] and has been the default since at least mongo 2.2[2]. Given its deprecation, the best thing to do is just take it out.
[0]: https://github.com/pulp/pulp/blob/9396e2256ca4977a0854b30d84dd348d0217b6ec/server/pulp/plugins/types/database.py#L302
[1]: https://docs.mongodb.org/v2.6/reference/method/db.collection.ensureIndex/
[2]: https://docs.mongodb.org/v2.2/reference/method/db.collection.ensureIndex/
Updated by semyers about 8 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulp|aad4d3a9416ab60361ad8adf98446103ae29ebfe.
Added by semyers about 8 years ago
Revision a27aa207 | View on GitHub
drop checks for dropDups
The upgrade to fedora 23 revealed that the 'dropDups' property of mongo indices was deprecated in 2.6 and removed in 2.7.
The removed 'dropDups' assertions weren't stricly necessary, since the test is checking that the uniqueness contraint is applied, which it is.
dropDups only comes into play if it's explicitly requested, which we never do.
https://pulp.plan.io/issues/1393
fixes #1393
Added by semyers about 8 years ago
Revision a27aa207 | View on GitHub
drop checks for dropDups
The upgrade to fedora 23 revealed that the 'dropDups' property of mongo indices was deprecated in 2.6 and removed in 2.7.
The removed 'dropDups' assertions weren't stricly necessary, since the test is checking that the uniqueness contraint is applied, which it is.
dropDups only comes into play if it's explicitly requested, which we never do.
https://pulp.plan.io/issues/1393
fixes #1393
Added by semyers about 8 years ago
Revision c54ba8f0 | View on GitHub
drop checks for dropDups
The upgrade to fedora 23 revealed that the 'dropDups' property of mongo indices was deprecated in 2.6 and removed in 2.7[0].
The removed 'dropDups' assertions weren't stricly necessary, since the test is checking that the uniqueness contraint is applied, which it is.
dropDups only comes into play if it's explicitly requested, which we never do.
https://pulp.plan.io/issues/1393
fixes #1393
Added by semyers about 8 years ago
Revision c54ba8f0 | View on GitHub
drop checks for dropDups
The upgrade to fedora 23 revealed that the 'dropDups' property of mongo indices was deprecated in 2.6 and removed in 2.7[0].
The removed 'dropDups' assertions weren't stricly necessary, since the test is checking that the uniqueness contraint is applied, which it is.
dropDups only comes into play if it's explicitly requested, which we never do.
https://pulp.plan.io/issues/1393
fixes #1393
Updated by semyers about 8 years ago
Some background on all the associated commits:
This was fixed on master in https://github.com/pulp/pulp/pull/2210 (aad4d3a9), but then backported to 2.6-dev in https://github.com/pulp/pulp/pull/2211 (a27aa207), and 2.7-dev in https://github.com/pulp/pulp/pull/2213 (c54ba8f0).
We weren't able to just merge the 2.6-dev changes forward due to a new file appearing in 2.7-dev, hence the two addition PRs for backporting instead of one.
Updated by dkliban@redhat.com almost 8 years ago
- Status changed from MODIFIED to 5
Updated by dkliban@redhat.com over 7 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
drop checks for dropDups
The upgrade to fedora 23 revealed that the 'dropDups' property of mongo indices was deprecated in 2.6 and removed in 2.7[0].
The removed 'dropDups' assertions weren't stricly necessary, since the test is checking that the uniqueness contraint is applied, which it is.
dropDups only comes into play if it's explicitly requested, which we never do.
https://pulp.plan.io/issues/1393
fixes #1393