Merge lp:~dobey/ubuntuone-dev-tools/update-4-2 into lp:ubuntuone-dev-tools/stable-4-2

Proposed by dobey on 2013-02-13
Status: Merged
Approved by: dobey on 2013-02-14
Approved revision: 104
Merged at revision: 104
Proposed branch: lp:~dobey/ubuntuone-dev-tools/update-4-2
Merge into: lp:ubuntuone-dev-tools/stable-4-2
Diff against target: 112 lines (+20/-9)
3 files modified
ubuntuone/devtools/services/squid.py (+10/-2)
ubuntuone/devtools/testcases/tests/test_squid_testcase.py (+5/-3)
ubuntuone/devtools/testing/tests/test_txwebserver.py (+5/-4)
To merge this branch: bzr merge lp:~dobey/ubuntuone-dev-tools/update-4-2
Reviewer Review Type Date Requested Status
Brian Curtin (community) 2013-02-13 Approve on 2013-02-13
Review via email: mp+148239@code.launchpad.net

Commit message

[Rodney Dawes]

    Ignore ESRCH when killing squid process, in event it already died.
    Skip a failing test on linux due to ncsa_auth crashing.
    Fix dependency on re-export of imports from a twisted module.

To post a comment you must log in.
review: Approve
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (25.3 KiB)

The attempt to merge lp:~dobey/ubuntuone-dev-tools/update-4-2 into lp:ubuntuone-dev-tools/stable-4-2 failed. Below is the output from the failed tests.

Starting squid version...
Waiting for squid to start....
ubuntuone.devtools.testing.tests.test_txwebserver
  MultipleWebServersTestCase
    test_multiple_requests ... [OK]
    test_single_request ... [OK]
twisted.trial._asynctest
  TestCase
    runTest ... [OK]
ubuntuone.devtools.testing.tests.test_txwebserver
  WebServerTestCase
    test_get_iri ... [OK]
    test_get_port ... [OK]
    test_multiple_requests ... [OK]
    test_single_request ... [OK]
ubuntuone.devtools.testcases
  BaseTestCase
    runTest ... [OK]
ubuntuone.devtools.tests.test_decorators
  TestSkipBasicDecorators
    test_skip_class ... [OK]
    test_skip_decorators ... [OK]
ubuntuone.devtools.tests.test_txcheck
  TestCheckTwistedTestClass
    test_bad_mixin_order ... [OK]
    test_bare_super ... [OK]
    test_inline_callbacks ... [OK]
    test_inline_callbacks_missing ... [OK]
    test_missing_return ... [OK]
    test_no_problems ... [OK]
    test_not_twisted ... [OK]
    test_ok_mixin_order ... [OK]
    test_super_not_called ... [OK]
  TestTwistedCheckSuite
    test_suite_catches_problems ... [OK]
    test_suite_runs_tests ... [OK]
twisted.trial._asynctest
  TestCase
    runTest ... [OK]
ubuntuone.devtools.testcases
  BaseTestCase
    runTest ... [OK]
ubuntuone.devtools.tests.test_utils
  OptionParserTestCase
    test_get_flags_long_arg ... [OK]
    test_get_flags_short_arg ... [OK]
    test_get_params_combined_arg ... [OK]
    test_get_params_missing_arg ... [OK]
    test_get_params_short_arg ... [OK]
    test_get_params_split_arg ... [OK]
    test_unknown_option ... [OK]
ubuntuone.devtools.testcases.tests.test_txsocketserver
  Protocol...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntuone/devtools/services/squid.py'
2--- ubuntuone/devtools/services/squid.py 2012-11-28 21:45:47 +0000
3+++ ubuntuone/devtools/services/squid.py 2013-02-13 16:55:18 +0000
4@@ -1,5 +1,5 @@
5 #
6-# Copyright 2011-2012 Canonical Ltd.
7+# Copyright 2011-2013 Canonical Ltd.
8 #
9 # This program is free software: you can redistribute it and/or modify it
10 # under the terms of the GNU General Public License version 3, as published
11@@ -29,6 +29,7 @@
12
13 from __future__ import print_function
14
15+import errno
16 import random
17 import signal
18 # pylint:disable=W0402
19@@ -305,7 +306,14 @@
20
21 def stop_service(self):
22 """Stop our proxy,"""
23- kill_squid(self.squid_pid)
24+ try:
25+ kill_squid(self.squid_pid)
26+ except OSError as err:
27+ # If the process already died, ignore the error
28+ if err.errno == errno.ESRCH:
29+ pass
30+ else:
31+ raise
32 delete_proxy_settings()
33 self.running = False
34 unlink(self.config_file)
35
36=== modified file 'ubuntuone/devtools/testcases/tests/test_squid_testcase.py'
37--- ubuntuone/devtools/testcases/tests/test_squid_testcase.py 2012-11-28 21:45:47 +0000
38+++ ubuntuone/devtools/testcases/tests/test_squid_testcase.py 2013-02-13 16:55:18 +0000
39@@ -1,6 +1,6 @@
40 # -*- coding: utf-8 -*-
41 #
42-# Copyright 2011-2012 Canonical Ltd.
43+# Copyright 2011-2013 Canonical Ltd.
44 #
45 # This program is free software: you can redistribute it and/or modify it
46 # under the terms of the GNU General Public License version 3, as published
47@@ -32,7 +32,7 @@
48 from twisted.application import internet, service
49 from twisted.internet import defer, reactor
50 from twisted.web import client, error, http, resource, server
51-
52+from ubuntuone.devtools.testcases import skipIfOS
53 from ubuntuone.devtools.testcases.squid import SquidTestCase
54
55
56@@ -177,7 +177,7 @@
57
58 root.putChild(THROWERROR, resource.NoResource())
59
60- unauthorized_resource = resource.ErrorPage(resource.http.UNAUTHORIZED,
61+ unauthorized_resource = resource.ErrorPage(http.UNAUTHORIZED,
62 "Unauthorized",
63 "Unauthorized")
64 root.putChild(UNAUTHORIZED, unauthorized_resource)
65@@ -252,6 +252,8 @@
66 settings['port'])
67 self.assertEqual(SAMPLE_RESOURCE, data)
68
69+ @skipIfOS('linux2',
70+ 'LP: #1111880 - ncsa_auth crashing for auth proxy tests.')
71 @defer.inlineCallbacks
72 def test_auth_url_access(self):
73 """Test accessing to the url."""
74
75=== modified file 'ubuntuone/devtools/testing/tests/test_txwebserver.py'
76--- ubuntuone/devtools/testing/tests/test_txwebserver.py 2012-11-28 21:45:47 +0000
77+++ ubuntuone/devtools/testing/tests/test_txwebserver.py 2013-02-13 16:55:18 +0000
78@@ -1,5 +1,6 @@
79 # -*- coding: utf-8 -*-
80-# Copyright 2012 Canonical Ltd.
81+#
82+# Copyright 2012-2013 Canonical Ltd.
83 #
84 # This program is free software: you can redistribute it and/or modify it
85 # under the terms of the GNU General Public License version 3, as published
86@@ -32,7 +33,7 @@
87
88 from twisted.internet import defer
89 from twisted.trial.unittest import TestCase
90-from twisted.web import client, resource
91+from twisted.web import client, resource, http
92
93 from ubuntuone.devtools.testing.txwebserver import HTTPWebServer
94
95@@ -73,7 +74,7 @@
96 root.putChild(OTHER_SIMPLERESOURCE, SimpleResource())
97 root.putChild(THROWERROR, resource.NoResource())
98
99- unauthorized_resource = resource.ErrorPage(resource.http.UNAUTHORIZED,
100+ unauthorized_resource = resource.ErrorPage(http.UNAUTHORIZED,
101 "Unauthorized",
102 "Unauthorized")
103 root.putChild(UNAUTHORIZED, unauthorized_resource)
104@@ -130,7 +131,7 @@
105 self.root.putChild(OTHER_SIMPLERESOURCE, SimpleResource())
106 self.root.putChild(THROWERROR, resource.NoResource())
107
108- unauthorized_resource = resource.ErrorPage(resource.http.UNAUTHORIZED,
109+ unauthorized_resource = resource.ErrorPage(http.UNAUTHORIZED,
110 "Unauthorized",
111 "Unauthorized")
112 self.root.putChild(UNAUTHORIZED, unauthorized_resource)

Subscribers

People subscribed via source and target branches

to all changes: