github.com/wallyworld/juju@v0.0.0-20161013125918-6cf1bc9d917a/apiserver/controller/export_test.go (about)

     1  // Copyright 2016 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package controller
     5  
     6  import (
     7  	"github.com/juju/juju/core/migration"
     8  	"github.com/juju/juju/state"
     9  )
    10  
    11  type patcher interface {
    12  	PatchValue(destination, source interface{})
    13  }
    14  
    15  func SetPrecheckResult(p patcher, err error) {
    16  	p.PatchValue(&runMigrationPrechecks, func(*state.State, migration.TargetInfo) error {
    17  		return err
    18  	})
    19  }