Merge lp:~cmiller/desktopcouch/use-test-context into lp:desktopcouch

Proposed by Chad Miller
Status: Merged
Approved by: Eric Casteleijn
Approved revision: 228
Merged at revision: 226
Proposed branch: lp:~cmiller/desktopcouch/use-test-context
Merge into: lp:desktopcouch
Diff against target: 75 lines (+15/-10)
4 files modified
desktopcouch/application/tests/test_local_files.py (+12/-5)
desktopcouch/records/database.py (+0/-2)
desktopcouch/records/tests/test_server.py (+2/-2)
run-tests (+1/-1)
To merge this branch: bzr merge lp:~cmiller/desktopcouch/use-test-context
Reviewer Review Type Date Requested Status
dobey (community) Approve
Eric Casteleijn (community) Approve
Review via email: mp+41730@code.launchpad.net

Commit message

Fix a few tests that didn't test against a test context.

To post a comment you must log in.
Revision history for this message
Eric Casteleijn (thisfred) wrote :

Looks great, approved, provided you pass the -c option to u1trial again.

review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

Voting does not meet specified criteria. Required: Approve >= 2, Disapprove == 0, Needs Fixing == 0, Needs Information == 0, Resubmit == 0. Got: 1 Approve.

Revision history for this message
dobey (dobey) wrote :

What's with the changes to run-tests? I don't understand.

review: Needs Information
Revision history for this message
Chad Miller (cmiller) wrote :

Rodney, this is a public project. Not everyone has access to the "nightlies PPA" or u1trial.

Revision history for this message
dobey (dobey) wrote :

The nightlies PPA and ubuntuone-devtools are both totally public.

Looks like there's a conflict now too though.

Revision history for this message
dobey (dobey) wrote :

I don't think the set -x is necessary, but otherwise looks ok.

review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (23.6 KiB)

The attempt to merge lp:~cmiller/desktopcouch/use-test-context into lp:desktopcouch failed. Below is the output from the failed tests.

Apache CouchDB has started, time to relax.
Browse your desktop CouchDB at file:///tmp/tmpeJDPFg/data/couchdb.html
desktopcouch.application.tests.test_start_local_couchdb
  TestUpdateDesignDocuments
    test_create_databases_and_design_docs ... [OK]
desktopcouch.application.tests.test_service
  TestService
    test_start_desktopcouch_replication ... [OK]
    test_start_new_desktopcouch_extensions ... [OK]
    test_start_new_desktopcouch_no_extensions ... [OK]
desktopcouch.application.tests.test_local_files
  TestKeyringIntegration
    test_with_auth ... [OK]
    test_with_no_auth ... [OK]
  TestLocalFiles
    test_all_files_returned ... [OK]
    test_bind_address ... [OK]
    test_couch_chain_ini_files ... [OK]
    test_xdg_overwrite_works ... [OK]
desktopcouch.application.tests.test_replication
  TestReplication
    test_creation ... Apache CouchDB has started, time to relax.
Browse your desktop CouchDB at file:///tmp/tmpt7ZD4r/data/couchdb.html
                                                     [OK]
  TestUbuntuoneReplication
    test_exclusion ... Apache CouchDB has started, time to relax.
Browse your desktop CouchDB at file:///tmp/tmpZ2IutB/data/couchdb.html
                                                    [OK]
desktopcouch.application.migration.tests.test_migration
  TestMigration
    test_migration_script_is_run ... [OK]
    test_migration_script_is_run_and_can_access_view ... [OK]
  TestRegistration
    test_register_migration_add_view_to_a_given_db ... [OK]
    test_register_migration_add_view_to_all_the_dbs ... [OK]
    test_register_migration_is_added_to_the_registry ... [OK]
desktopcouch.application.pair.tests.test_couchdb_io
  TestCouchdbIo
    test_get_database_names_replicatable ... [OK]
    test_get_my_host_unique_id ... [OK]
    test_mkuri ... [OK]
    test_obsfuscation ... [OK]
    test_put_dynamic_paired_host ... [OK]
    test_put_static_paired_service ... [OK]
desktopcouch.application.pair.tests.test_ubuntuone_pairing
  TestUbuntonePairing
    test_pair_with_ubuntuone_no_record ... [OK]
    test_pair_with_ubuntuone_no_view ... [OK]
    test_pair_with_ubuntuone_record_present ... [OK]
    test_pair_with_ubuntuone_user_deleted_record ... [O...

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (22.5 KiB)

The attempt to merge lp:~cmiller/desktopcouch/use-test-context into lp:desktopcouch failed. Below is the output from the failed tests.

Apache CouchDB has started, time to relax.
Browse your desktop CouchDB at file:///tmp/tmp8uZSJ8/data/couchdb.html
desktopcouch.application.tests.test_start_local_couchdb
  TestUpdateDesignDocuments
    test_create_databases_and_design_docs ... [OK]
desktopcouch.application.tests.test_service
  TestService
    test_start_desktopcouch_replication ... [OK]
    test_start_new_desktopcouch_extensions ... [OK]
    test_start_new_desktopcouch_no_extensions ... [OK]
desktopcouch.application.tests.test_local_files
  TestKeyringIntegration
    test_with_auth ... [OK]
    test_with_no_auth ... [OK]
  TestLocalFiles
    test_all_files_returned ... [OK]
    test_bind_address ... [OK]
    test_couch_chain_ini_files ... [OK]
    test_xdg_overwrite_works ... [OK]
desktopcouch.application.tests.test_replication
  TestReplication
    test_creation ... Apache CouchDB has started, time to relax.
Browse your desktop CouchDB at file:///tmp/tmpJXoveu/data/couchdb.html
                                                     [OK]
  TestUbuntuoneReplication
    test_exclusion ... Apache CouchDB has started, time to relax.
Browse your desktop CouchDB at file:///tmp/tmpbrPbbP/data/couchdb.html
                                                    [OK]
desktopcouch.application.migration.tests.test_migration
  TestMigration
    test_migration_script_is_run ... [OK]
    test_migration_script_is_run_and_can_access_view ... [OK]
  TestRegistration
    test_register_migration_add_view_to_a_given_db ... [OK]
    test_register_migration_add_view_to_all_the_dbs ... [OK]
    test_register_migration_is_added_to_the_registry ... [OK]
desktopcouch.application.pair.tests.test_couchdb_io
  TestCouchdbIo
    test_get_database_names_replicatable ... [OK]
    test_get_my_host_unique_id ... [OK]
    test_mkuri ... [OK]
    test_obsfuscation ... [OK]
    test_put_dynamic_paired_host ... [OK]
    test_put_static_paired_service ... [OK]
desktopcouch.application.pair.tests.test_ubuntuone_pairing
  TestUbuntonePairing
    test_pair_with_ubuntuone_no_record ... [OK]
    test_pair_with_ubuntuone_no_view ... [OK]
    test_pair_with_ubuntuone_record_present ... [OK]
    test_pair_with_ubuntuone_user_deleted_record ... [O...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'desktopcouch/application/tests/test_local_files.py'
2--- desktopcouch/application/tests/test_local_files.py 2010-11-22 21:07:50 +0000
3+++ desktopcouch/application/tests/test_local_files.py 2010-11-24 17:15:54 +0000
4@@ -64,17 +64,24 @@
5
6 def test_bind_address(self):
7 """Test bind_address."""
8- old = desktopcouch.application.local_files.get_bind_address()
9+ old = desktopcouch.application.local_files.get_bind_address(
10+ ctx=test_environment.test_context)
11 octets = old.split(".")
12 octets[2] = str((int(octets[2]) + 128) % 256)
13 new = ".".join(octets)
14- desktopcouch.application.local_files.set_bind_address(new)
15+ desktopcouch.application.local_files.set_bind_address(new,
16+ ctx=test_environment.test_context)
17
18 self.assertEquals(
19- desktopcouch.application.local_files.get_bind_address(), new)
20- desktopcouch.application.local_files.set_bind_address(old)
21+ desktopcouch.application.local_files.get_bind_address(
22+ ctx=test_environment.test_context),
23+ new)
24+ desktopcouch.application.local_files.set_bind_address(old,
25+ ctx=test_environment.test_context)
26 self.assertEquals(
27- desktopcouch.application.local_files.get_bind_address(), old)
28+ desktopcouch.application.local_files.get_bind_address(
29+ ctx=test_environment.test_context),
30+ old)
31
32
33 class TestKeyringIntegration(MockerTestCase):
34
35=== modified file 'desktopcouch/records/database.py'
36--- desktopcouch/records/database.py 2010-11-24 15:16:11 +0000
37+++ desktopcouch/records/database.py 2010-11-24 17:15:54 +0000
38@@ -197,8 +197,6 @@
39
40 def _reconnect(self, uri=None):
41 """Reconnect after losing connection."""
42- logging.info("Connecting to %s.",
43- self.server_uri or "discovered local port")
44 self._server = self._server_class(uri or self.server_uri,
45 **self._server_class_extras)
46 if self._database_name not in self._server:
47
48=== modified file 'desktopcouch/records/tests/test_server.py'
49--- desktopcouch/records/tests/test_server.py 2010-11-23 18:47:46 +0000
50+++ desktopcouch/records/tests/test_server.py 2010-11-24 17:15:54 +0000
51@@ -207,8 +207,8 @@
52 def test_database_not_exists(self):
53 """Test that the database does not exist."""
54 self.assertRaises(
55- NoSuchDatabase, DesktopDatabase, "this-must-not-exist",
56- create=False)
57+ NoSuchDatabase, DesktopDatabase, "this-must-not-exist",
58+ create=False, ctx=get_test_context())
59
60 def test_get_records_by_record_type_save_view(self):
61 """Test getting mutliple records by type"""
62
63=== modified file 'run-tests'
64--- run-tests 2010-11-23 16:29:42 +0000
65+++ run-tests 2010-11-24 17:15:54 +0000
66@@ -13,8 +13,8 @@
67 #
68 # You should have received a copy of the GNU Affero General Public License
69 # along with this program. If not, see <http://www.gnu.org/licenses/>.
70-set -e
71
72+set -e -x
73 u1trial -c desktopcouch
74 u1lint
75 pep8 --repeat .

Subscribers

People subscribed via source and target branches