Index: worker/machineenvironmentworker/machineenvironmentworker_test.go |
=== modified file 'worker/machineenvironmentworker/machineenvironmentworker_test.go' |
--- worker/machineenvironmentworker/machineenvironmentworker_test.go 2014-03-13 07:54:56 +0000 |
+++ worker/machineenvironmentworker/machineenvironmentworker_test.go 2014-03-17 06:05:54 +0000 |
@@ -119,8 +119,6 @@ |
} |
func (s *MachineEnvironmentWatcherSuite) updateConfig(c *gc.C) (osenv.ProxySettings, osenv.ProxySettings) { |
- oldConfig, err := s.State.EnvironConfig() |
- c.Assert(err, gc.IsNil) |
proxySettings := osenv.ProxySettings{ |
Http: "http proxy", |
@@ -128,9 +126,10 @@ |
Ftp: "ftp proxy", |
NoProxy: "no proxy", |
} |
- |
- envConfig, err := oldConfig.Apply(config.ProxyConfigMap(proxySettings)) |
- c.Assert(err, gc.IsNil) |
+ attrs := map[string]interface{}{} |
+ for k, v := range config.ProxyConfigMap(proxySettings) { |
+ attrs[k] = v |
+ } |
// We explicitly set apt proxy settings as well to show that it is the apt |
// settings that are used for the apt config, and not just the normal |
@@ -141,10 +140,11 @@ |
Https: "apt https proxy", |
Ftp: "apt ftp proxy", |
} |
- envConfig, err = envConfig.Apply(config.AptProxyConfigMap(aptProxySettings)) |
- c.Assert(err, gc.IsNil) |
+ for k, v := range config.AptProxyConfigMap(aptProxySettings) { |
+ attrs[k] = v |
+ } |
- err = s.State.SetEnvironConfig(envConfig, oldConfig) |
+ err := s.State.UpdateEnvironConfig(attrs, nil, nil) |
c.Assert(err, gc.IsNil) |
return proxySettings, aptProxySettings |