Merge lp:~reedobrien/charmworld/reindex_test into lp:charmworld

Proposed by Reed O'Brien
Status: Merged
Approved by: Reed O'Brien
Approved revision: 511
Merged at revision: 510
Proposed branch: lp:~reedobrien/charmworld/reindex_test
Merge into: lp:charmworld
Diff against target: 28 lines (+2/-6)
1 file modified
charmworld/tests/test_search.py (+2/-6)
To merge this branch: bzr merge lp:~reedobrien/charmworld/reindex_test
Reviewer Review Type Date Requested Status
Juju Gui Bot continuous-integration Approve
Brad Crittenden (community) code Approve
Richard Harding Pending
Review via email: mp+219569@code.launchpad.net

Commit message

Fixes a destructive test in Bug #1317567.

Description of the change

Fixes the test that was destroying developer's charms indexes in ES.

Uses the base test class' use_index_client method to setup the test index instead.

To post a comment you must log in.
Revision history for this message
Brad Crittenden (bac) wrote :

Looks good, thanks. See inline comments.

review: Approve (code)
Revision history for this message
Juju Gui Bot (juju-gui-bot) wrote :

FAILED: Autolanding.
No commit message was specified in the merge proposal. Hit 'Add commit message' on the merge proposal web page or follow the link below. You can approve the merge proposal yourself to rerun.
https://code.launchpad.net/~reedobrien/charmworld/reindex_test/+merge/219569/+edit-commit-message

review: Needs Fixing (continuous-integration)
511. By Reed O'Brien

remove extraneous commented code

Revision history for this message
Brad Crittenden (bac) wrote :

Still a-ok

review: Approve (code)
Revision history for this message
Juju Gui Bot (juju-gui-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'charmworld/tests/test_search.py'
2--- charmworld/tests/test_search.py 2014-05-14 15:49:14 +0000
3+++ charmworld/tests/test_search.py 2014-05-14 18:00:34 +0000
4@@ -8,8 +8,6 @@
5 from textwrap import dedent
6 from time import sleep
7
8-import unittest
9-
10 from pyelasticsearch import ElasticSearch
11 from pyelasticsearch.exceptions import (
12 ElasticHttpError,
13@@ -1287,13 +1285,11 @@
14 'not_analyzed',
15 mapping['properties']['name']['fields']['name']['index'])
16
17- @unittest.skip("XXX: Bug #1317567 - http://bit.ly/1lsXCfv")
18 def test_reindexed_no_client_charms(self):
19- client = ElasticSearchClient.from_settings(get_ini())
20+ client = self.use_index_client()
21 # This should not raise an exception, even though the index does not
22 # exist.
23- new_client = reindex(client, charms=[])
24- new_client.delete_index()
25+ reindex(client, charms=[])
26
27
28 class TestDoctypeExtraction(TestCase):

Subscribers

People subscribed via source and target branches

to all changes: