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

Proposed by dobey
Status: Merged
Approved by: dobey
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) Approve
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.
Revision history for this message
Brian Curtin (brian.curtin) :
review: Approve
Revision history for this message
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
=== modified file 'ubuntuone/devtools/services/squid.py'
--- ubuntuone/devtools/services/squid.py 2012-11-28 21:45:47 +0000
+++ ubuntuone/devtools/services/squid.py 2013-02-13 16:55:18 +0000
@@ -1,5 +1,5 @@
1#1#
2# Copyright 2011-2012 Canonical Ltd.2# Copyright 2011-2013 Canonical Ltd.
3#3#
4# This program is free software: you can redistribute it and/or modify it4# This program is free software: you can redistribute it and/or modify it
5# under the terms of the GNU General Public License version 3, as published5# under the terms of the GNU General Public License version 3, as published
@@ -29,6 +29,7 @@
2929
30from __future__ import print_function30from __future__ import print_function
3131
32import errno
32import random33import random
33import signal34import signal
34# pylint:disable=W040235# pylint:disable=W0402
@@ -305,7 +306,14 @@
305306
306 def stop_service(self):307 def stop_service(self):
307 """Stop our proxy,"""308 """Stop our proxy,"""
308 kill_squid(self.squid_pid)309 try:
310 kill_squid(self.squid_pid)
311 except OSError as err:
312 # If the process already died, ignore the error
313 if err.errno == errno.ESRCH:
314 pass
315 else:
316 raise
309 delete_proxy_settings()317 delete_proxy_settings()
310 self.running = False318 self.running = False
311 unlink(self.config_file)319 unlink(self.config_file)
312320
=== modified file 'ubuntuone/devtools/testcases/tests/test_squid_testcase.py'
--- ubuntuone/devtools/testcases/tests/test_squid_testcase.py 2012-11-28 21:45:47 +0000
+++ ubuntuone/devtools/testcases/tests/test_squid_testcase.py 2013-02-13 16:55:18 +0000
@@ -1,6 +1,6 @@
1# -*- coding: utf-8 -*-1# -*- coding: utf-8 -*-
2#2#
3# Copyright 2011-2012 Canonical Ltd.3# Copyright 2011-2013 Canonical Ltd.
4#4#
5# This program is free software: you can redistribute it and/or modify it5# This program is free software: you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 3, as published6# under the terms of the GNU General Public License version 3, as published
@@ -32,7 +32,7 @@
32from twisted.application import internet, service32from twisted.application import internet, service
33from twisted.internet import defer, reactor33from twisted.internet import defer, reactor
34from twisted.web import client, error, http, resource, server34from twisted.web import client, error, http, resource, server
3535from ubuntuone.devtools.testcases import skipIfOS
36from ubuntuone.devtools.testcases.squid import SquidTestCase36from ubuntuone.devtools.testcases.squid import SquidTestCase
3737
3838
@@ -177,7 +177,7 @@
177177
178 root.putChild(THROWERROR, resource.NoResource())178 root.putChild(THROWERROR, resource.NoResource())
179179
180 unauthorized_resource = resource.ErrorPage(resource.http.UNAUTHORIZED,180 unauthorized_resource = resource.ErrorPage(http.UNAUTHORIZED,
181 "Unauthorized",181 "Unauthorized",
182 "Unauthorized")182 "Unauthorized")
183 root.putChild(UNAUTHORIZED, unauthorized_resource)183 root.putChild(UNAUTHORIZED, unauthorized_resource)
@@ -252,6 +252,8 @@
252 settings['port'])252 settings['port'])
253 self.assertEqual(SAMPLE_RESOURCE, data)253 self.assertEqual(SAMPLE_RESOURCE, data)
254254
255 @skipIfOS('linux2',
256 'LP: #1111880 - ncsa_auth crashing for auth proxy tests.')
255 @defer.inlineCallbacks257 @defer.inlineCallbacks
256 def test_auth_url_access(self):258 def test_auth_url_access(self):
257 """Test accessing to the url."""259 """Test accessing to the url."""
258260
=== modified file 'ubuntuone/devtools/testing/tests/test_txwebserver.py'
--- ubuntuone/devtools/testing/tests/test_txwebserver.py 2012-11-28 21:45:47 +0000
+++ ubuntuone/devtools/testing/tests/test_txwebserver.py 2013-02-13 16:55:18 +0000
@@ -1,5 +1,6 @@
1# -*- coding: utf-8 -*-1# -*- coding: utf-8 -*-
2# Copyright 2012 Canonical Ltd.2#
3# Copyright 2012-2013 Canonical Ltd.
3#4#
4# This program is free software: you can redistribute it and/or modify it5# This program is free software: you can redistribute it and/or modify it
5# under the terms of the GNU General Public License version 3, as published6# under the terms of the GNU General Public License version 3, as published
@@ -32,7 +33,7 @@
3233
33from twisted.internet import defer34from twisted.internet import defer
34from twisted.trial.unittest import TestCase35from twisted.trial.unittest import TestCase
35from twisted.web import client, resource36from twisted.web import client, resource, http
3637
37from ubuntuone.devtools.testing.txwebserver import HTTPWebServer38from ubuntuone.devtools.testing.txwebserver import HTTPWebServer
3839
@@ -73,7 +74,7 @@
73 root.putChild(OTHER_SIMPLERESOURCE, SimpleResource())74 root.putChild(OTHER_SIMPLERESOURCE, SimpleResource())
74 root.putChild(THROWERROR, resource.NoResource())75 root.putChild(THROWERROR, resource.NoResource())
7576
76 unauthorized_resource = resource.ErrorPage(resource.http.UNAUTHORIZED,77 unauthorized_resource = resource.ErrorPage(http.UNAUTHORIZED,
77 "Unauthorized",78 "Unauthorized",
78 "Unauthorized")79 "Unauthorized")
79 root.putChild(UNAUTHORIZED, unauthorized_resource)80 root.putChild(UNAUTHORIZED, unauthorized_resource)
@@ -130,7 +131,7 @@
130 self.root.putChild(OTHER_SIMPLERESOURCE, SimpleResource())131 self.root.putChild(OTHER_SIMPLERESOURCE, SimpleResource())
131 self.root.putChild(THROWERROR, resource.NoResource())132 self.root.putChild(THROWERROR, resource.NoResource())
132133
133 unauthorized_resource = resource.ErrorPage(resource.http.UNAUTHORIZED,134 unauthorized_resource = resource.ErrorPage(http.UNAUTHORIZED,
134 "Unauthorized",135 "Unauthorized",
135 "Unauthorized")136 "Unauthorized")
136 self.root.putChild(UNAUTHORIZED, unauthorized_resource)137 self.root.putChild(UNAUTHORIZED, unauthorized_resource)

Subscribers

People subscribed via source and target branches

to all changes: