Skip to content

Commit 7b27ee6

Browse files
committed
Remove mongo from api tests and also limit dependencies
1 parent 7ef493c commit 7b27ee6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+987
-957
lines changed

api/agent/fanconfigurer/facade.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package fanconfigurer
66
import (
77
"github.com/juju/juju/api/base"
88
apiwatcher "github.com/juju/juju/api/watcher"
9-
"github.com/juju/juju/apiserver/common/networkingcommon"
109
"github.com/juju/juju/core/network"
1110
"github.com/juju/juju/core/watcher"
1211
"github.com/juju/juju/rpc/params"
@@ -42,5 +41,5 @@ func (f *Facade) FanConfig() (network.FanConfig, error) {
4241
if err != nil {
4342
return nil, err
4443
}
45-
return networkingcommon.FanConfigResultToFanConfig(result)
44+
return params.FanConfigResultToFanConfig(result)
4645
}

api/apiclient.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -247,15 +247,15 @@ func Open(info *Info, opts DialOpts) (Connection, error) {
247247
host = dialResult.addr
248248
}
249249

250-
st := &conn{
250+
c := &conn{
251251
ctx: context.Background(),
252252
client: client,
253253
conn: dialResult.conn,
254254
clock: opts.Clock,
255255
addr: dialResult.addr,
256256
ipAddr: dialResult.ipAddr,
257257
cookieURL: CookieURLFromHost(host),
258-
pingerFacadeVersion: facadeVersions["Pinger"],
258+
pingerFacadeVersion: FacadeVersions["Pinger"],
259259
serverScheme: "https",
260260
serverRootAddress: dialResult.addr,
261261
// We populate the username and password before
@@ -272,25 +272,25 @@ func Open(info *Info, opts DialOpts) (Connection, error) {
272272
proxier: dialResult.proxier,
273273
}
274274
if !info.SkipLogin {
275-
if err := loginWithContext(dialCtx, st, info); err != nil {
275+
if err := loginWithContext(dialCtx, c, info); err != nil {
276276
dialResult.conn.Close()
277277
return nil, errors.Trace(err)
278278
}
279279
}
280280

281-
st.broken = make(chan struct{})
282-
st.closed = make(chan struct{})
281+
c.broken = make(chan struct{})
282+
c.closed = make(chan struct{})
283283

284284
go (&monitor{
285285
clock: opts.Clock,
286-
ping: st.ping,
286+
ping: c.ping,
287287
pingPeriod: PingPeriod,
288288
pingTimeout: pingTimeout,
289-
closed: st.closed,
289+
closed: c.closed,
290290
dead: client.Dead(),
291-
broken: st.broken,
291+
broken: c.broken,
292292
}).run()
293-
return st, nil
293+
return c, nil
294294
}
295295

296296
// CookieURLFromHost creates a url.URL from a given host.
@@ -316,7 +316,7 @@ func PerferredHost(info *Info) string {
316316
return host
317317
}
318318

319-
// loginWithContext wraps st.Login with code that terminates
319+
// loginWithContext wraps conn.Login with code that terminates
320320
// if the context is cancelled.
321321
// TODO(rogpeppe) pass Context into Login (and all API calls) so
322322
// that this becomes unnecessary.
@@ -1375,7 +1375,7 @@ func (c *conn) PublicDNSName() string {
13751375
// Facade we will want to use. It needs to line up the versions that the server
13761376
// reports to us, with the versions that our client knows how to use.
13771377
func (c *conn) BestFacadeVersion(facade string) int {
1378-
return bestVersion(facadeVersions[facade], c.facadeVersions[facade])
1378+
return bestVersion(FacadeVersions[facade], c.facadeVersions[facade])
13791379
}
13801380

13811381
// serverRoot returns the cached API server address and port used

0 commit comments

Comments
 (0)