github.com/makyo/juju@v0.0.0-20160425123129-2608902037e9/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(¬ify, n) 14 }