Index: environs/config/config_test.go |
=== modified file 'environs/config/config_test.go' |
--- environs/config/config_test.go 2014-05-16 04:57:59 +0000 |
+++ environs/config/config_test.go 2014-05-26 11:45:59 +0000 |
@@ -18,6 +18,7 @@ |
"launchpad.net/juju-core/juju/osenv" |
"launchpad.net/juju-core/schema" |
"launchpad.net/juju-core/testing" |
+ "launchpad.net/juju-core/utils/proxy" |
"launchpad.net/juju-core/version" |
) |
@@ -1320,33 +1321,33 @@ |
func (s *ConfigSuite) TestProxyConfigMap(c *gc.C) { |
s.addJujuFiles(c) |
cfg := newTestConfig(c, testing.Attrs{}) |
- proxy := osenv.ProxySettings{ |
+ proxySettings := proxy.Settings{ |
Http: "http proxy", |
Https: "https proxy", |
Ftp: "ftp proxy", |
NoProxy: "no proxy", |
} |
- cfg, err := cfg.Apply(config.ProxyConfigMap(proxy)) |
+ cfg, err := cfg.Apply(config.ProxyConfigMap(proxySettings)) |
c.Assert(err, gc.IsNil) |
- c.Assert(cfg.ProxySettings(), gc.DeepEquals, proxy) |
+ c.Assert(cfg.ProxySettings(), gc.DeepEquals, proxySettings) |
// Apt proxy and proxy differ by the content of the no-proxy values. |
- proxy.NoProxy = "" |
- c.Assert(cfg.AptProxySettings(), gc.DeepEquals, proxy) |
+ proxySettings.NoProxy = "" |
+ c.Assert(cfg.AptProxySettings(), gc.DeepEquals, proxySettings) |
} |
func (s *ConfigSuite) TestAptProxyConfigMap(c *gc.C) { |
s.addJujuFiles(c) |
cfg := newTestConfig(c, testing.Attrs{}) |
- proxy := osenv.ProxySettings{ |
+ proxySettings := proxy.Settings{ |
Http: "http proxy", |
Https: "https proxy", |
Ftp: "ftp proxy", |
} |
- cfg, err := cfg.Apply(config.AptProxyConfigMap(proxy)) |
+ cfg, err := cfg.Apply(config.AptProxyConfigMap(proxySettings)) |
c.Assert(err, gc.IsNil) |
// The default proxy settings should still be empty. |
- c.Assert(cfg.ProxySettings(), gc.DeepEquals, osenv.ProxySettings{}) |
- c.Assert(cfg.AptProxySettings(), gc.DeepEquals, proxy) |
+ c.Assert(cfg.ProxySettings(), gc.DeepEquals, proxy.Settings{}) |
+ c.Assert(cfg.AptProxySettings(), gc.DeepEquals, proxySettings) |
} |
func (s *ConfigSuite) TestGenerateStateServerCertAndKey(c *gc.C) { |