1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package juju_test
import (
"launchpad.net/juju-core/instance"
"launchpad.net/juju-core/juju"
"launchpad.net/juju-core/state/api"
)
type mockAPIState struct {
close func(juju.APIState) error
apiHostPorts [][]instance.HostPort
}
func (s *mockAPIState) Close() error {
if s.close != nil {
return s.close(s)
}
return nil
}
func (s *mockAPIState) APIHostPorts() [][]instance.HostPort {
return s.apiHostPorts
}
func panicAPIOpen(apiInfo *api.Info, opts api.DialOpts) (juju.APIState, error) {
panic("api.Open called unexpectedly")
}
|