lp:~free.ekanayaka/landscape-client/amp-cleanup
- Get this branch:
- bzr branch lp:~free.ekanayaka/landscape-client/amp-cleanup
Branch merges
- Geoff Teale (community): Approve
- Alberto Donato (community): Approve
-
Diff: 621 lines (+102/-93)4 files modifiedlandscape/lib/amp.py (+46/-49)
landscape/lib/tests/test_amp.py (+52/-41)
landscape/tests/test_amp.py (+1/-1)
landscape/tests/test_configuration.py (+3/-2)
Branch information
Recent revisions
- 660. By Free Ekanayaka
-
Merge testable-amp [f=1169102] [r=ack,tealeg] [a=Free Ekanayaka]
This is a first step towards having synchronous tests for AMP-related code:- Use composition vs inheritance, so MethodCallServe
rProtocol has now become
MethodCallReceiver and MethodCallClien tProtocol has become MethodCallSender.
They don't inherit from the base AMP protocol anymore, this will let us mock
the AMP protocol itself later on.- Put in place temporary workarounds (marked with "XXX") for the few breakages
that such refactoring causes. These will be cleaned up in a follow-up branch.- Changed most of the tests in l/lib/tests/
test_amp. py to be synchronous and not
use the real Twisted reactor. This is done by faking the transport, so we can
simulate a connection rather than use real Unix sockets. These methods don't
need to return deferreds anymore in order to perform their assertions, as
they can trust that everything happens synchronously. - 659. By Free Ekanayaka
-
Drop out-of-date Twisted trial hacks (fixed since Twisted 2.5, in hardy) [trivial] [r=cglass]
- 658. By Free Ekanayaka
-
Add successResultOf and failureResultOf to LandscapeTest, taken from Twisted 12.3.0 [trivial] [r=cglass]
- 657. By Free Ekanayaka
-
Merge reactor-cleanup [f=1168315] [r=tealeg,ack] [a=Free Ekanayaka]
This branch is actually a trivial change:- Improve docstrings everywhere, mentioning the surprising behavior around
the use of listen_unix in FakeReactor.- Drop ThreadedCallsRe
actorMixin, which was meant to hold common functionality
between TwistedReactor and FakeReactor, but had none. Its call_in_thread method
has been moved to TwistedReactor while call_in_main to FakeReactor, where they
are actually used.- Move FakeReactor after TwistedReactor in the reactor.py file.
- Re-arrange the order of method definitions in both FakeReactor and TwistedReactor
so they match.- Drop udp-related methods, which we don't use.
- 655. By Free Ekanayaka
-
Merge exchange-token [f=1161856] [r=tribaal,ack] [a=Free Ekanayaka]
This branch implements the client-side part of the changes needed to detect cloned computers. The idea is that at each exchange the server will give the client a token that the client will be required to give back at the following exchange to prove that it's still the same client. If two clients with the same secure ID try to perform an exchange using the same token, only the first one that completes the exchange will succeed, because the second will not be authenticated since the token has changed in the meantime (after the first exchange completed).
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:~landscape/landscape-client/trunk