github.com/cloudbase/juju-core@v0.0.0-20140504232958-a7271ac7912f/worker/deployer/export_test.go (about) 1 // Copyright 2013 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package deployer 5 6 import ( 7 "launchpad.net/juju-core/agent" 8 "launchpad.net/juju-core/state/api/params" 9 ) 10 11 type fakeAPI struct{} 12 13 func (*fakeAPI) ConnectionInfo() (params.DeployerConnectionValues, error) { 14 return params.DeployerConnectionValues{ 15 StateAddresses: []string{"s1:123", "s2:123"}, 16 APIAddresses: []string{"a1:123", "a2:123"}, 17 }, nil 18 } 19 20 func NewTestSimpleContext(agentConfig agent.Config, initDir, logDir string) *SimpleContext { 21 return &SimpleContext{ 22 api: &fakeAPI{}, 23 agentConfig: agentConfig, 24 initDir: initDir, 25 } 26 }