launchpad.net/~rogpeppe/juju-core/500-errgo-fix@v0.0.0-20140213181702-000000002356/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  		[]string{"s1:123", "s2:123"},
    16  		[]string{"a1:123", "a2:123"},
    17  		2345,
    18  	}, nil
    19  }
    20  
    21  func NewTestSimpleContext(agentConfig agent.Config, initDir, logDir, syslogConfigDir string) *SimpleContext {
    22  	return &SimpleContext{
    23  		api:             &fakeAPI{},
    24  		agentConfig:     agentConfig,
    25  		initDir:         initDir,
    26  		logDir:          logDir,
    27  		syslogConfigDir: syslogConfigDir,
    28  	}
    29  }