github.com/cloudbase/juju-core@v0.0.0-20140504232958-a7271ac7912f/state/testing/agent.go (about) 1 // Copyright 2012, 2013 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package testing 5 6 import ( 7 "launchpad.net/juju-core/state" 8 "launchpad.net/juju-core/version" 9 ) 10 11 // SetAgentVersion sets the current agent version in the state's 12 // environment configuration. 13 func SetAgentVersion(st *state.State, vers version.Number) error { 14 return UpdateConfig(st, map[string]interface{}{"agent-version": vers.String()}) 15 }