github.com/mhilton/juju-juju@v0.0.0-20150901100907-a94dd2c73455/worker/metricworker/export_test.go (about)

     1  // Copyright 2014 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package metricworker
     5  
     6  import (
     7  	"github.com/juju/testing"
     8  )
     9  
    10  // PatchNotificationChannel sets the notify channel which can be used
    11  // in tests to know that a particular worker has called its work function.
    12  func PatchNotificationChannel(n chan string) func() {
    13  	return testing.PatchValue(&notify, n)
    14  }