~thumper/juju-core/move-environs-tools

« back to all changes in this revision

Viewing changes to worker/cleaner/cleaner_test.go

  • Committer: Tarmac
  • Author(s): John Arbash Meinel
  • Date: 2013-07-08 12:51:34 UTC
  • mfrom: (1390.3.4 use-notify-worker)
  • Revision ID: tarmac-20130708125134-nr74t8u11iw61vu0
[r=jameinel] worker/cleaner: use new NotifyWorker structure

Just reimplements the Cleaner worker as a WatchHandler passed to the
NotifyWorker. Cleaner was pretty simple, but I'm still able to remove about
20 lines of boilerplate. (And replace it with heavily tested logic.)

https://codereview.appspot.com/10876048/

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
var _ = Suite(&CleanerSuite{})
25
25
 
26
 
var _ worker.Worker = (*cleaner.Cleaner)(nil)
 
26
var _ worker.WatchHandler = (*cleaner.Cleaner)(nil)
27
27
 
28
28
func (s *CleanerSuite) TestCleaner(c *C) {
29
29
        cr := cleaner.NewCleaner(s.State)