~themue/juju-core/053-env-more-script-friendly

« back to all changes in this revision

Viewing changes to juju/testing/conn.go

  • Committer: Dimiter Naydenov
  • Date: 2013-07-29 15:15:41 UTC
  • mto: This revision was merged to the branch mainline in revision 1565.
  • Revision ID: dimiter.naydenov@canonical.com-20130729151541-zm8murwo9u7mtsdu
names: new package

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
import (
7
7
        "fmt"
8
8
        "io/ioutil"
 
9
        "os"
 
10
        "path/filepath"
 
11
 
9
12
        . "launchpad.net/gocheck"
 
13
 
10
14
        "launchpad.net/juju-core/charm"
11
15
        "launchpad.net/juju-core/constraints"
12
16
        "launchpad.net/juju-core/environs"
14
18
        "launchpad.net/juju-core/environs/dummy"
15
19
        "launchpad.net/juju-core/instance"
16
20
        "launchpad.net/juju-core/juju"
 
21
        "launchpad.net/juju-core/names"
17
22
        "launchpad.net/juju-core/state"
18
23
        "launchpad.net/juju-core/state/api"
19
24
        "launchpad.net/juju-core/testing"
20
25
        "launchpad.net/juju-core/version"
21
 
        "os"
22
 
        "path/filepath"
23
26
)
24
27
 
25
28
// JujuConnSuite provides a freshly bootstrapped juju.Conn
60
63
func FakeStateInfo(machineId string) *state.Info {
61
64
        return &state.Info{
62
65
                Addrs:    []string{"0.1.2.3:1234"},
63
 
                Tag:      state.MachineTag(machineId),
 
66
                Tag:      names.MachineTag(machineId),
64
67
                Password: "unimportant",
65
68
                CACert:   []byte(testing.CACert),
66
69
        }
72
75
func FakeAPIInfo(machineId string) *api.Info {
73
76
        return &api.Info{
74
77
                Addrs:    []string{"0.1.2.3:1234"},
75
 
                Tag:      state.MachineTag(machineId),
 
78
                Tag:      names.MachineTag(machineId),
76
79
                Password: "unimportant",
77
80
                CACert:   []byte(testing.CACert),
78
81
        }