github.com/mattyw/juju@v0.0.0-20140610034352-732aecd63861/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 "github.com/juju/juju/agent" 8 "github.com/juju/juju/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 }