Merge lp:~wallyworld/juju-core/deprecated-tools-url-value into lp:~go-bot/juju-core/trunk

Proposed by Ian Booth
Status: Merged
Approved by: Ian Booth
Approved revision: no longer in the source branch.
Merged at revision: 2053
Proposed branch: lp:~wallyworld/juju-core/deprecated-tools-url-value
Merge into: lp:~go-bot/juju-core/trunk
Diff against target: 36 lines (+5/-3)
2 files modified
environs/config/config.go (+1/-1)
environs/config/config_test.go (+4/-2)
To merge this branch: bzr merge lp:~wallyworld/juju-core/deprecated-tools-url-value
Reviewer Review Type Date Requested Status
Ian Booth Approve
Review via email: mp+194965@code.launchpad.net

Commit message

Change the default (deprecated) tools-url value from omit to "" to prevent errors in some situations.

Description of the change

Change the default (deprecated) tools-url value from omit to "" to prevent errors in some situations.

To post a comment you must log in.
Revision history for this message
Ian Booth (wallyworld) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'environs/config/config.go'
2--- environs/config/config.go 2013-11-11 02:01:53 +0000
3+++ environs/config/config.go 2013-11-13 00:46:50 +0000
4@@ -540,7 +540,7 @@
5 "logging-config": schema.Omit,
6
7 // Deprecated fields, retain for backwards compatibility.
8- "tools-url": schema.Omit,
9+ "tools-url": "",
10
11 // For backward compatibility reasons, the following
12 // attributes default to empty strings rather than being
13
14=== modified file 'environs/config/config_test.go'
15--- environs/config/config_test.go 2013-11-11 02:01:53 +0000
16+++ environs/config/config_test.go 2013-11-13 00:46:50 +0000
17@@ -776,8 +776,9 @@
18 c.Assert(urlPresent, jc.IsFalse)
19 c.Assert(deprecatedURLPresent, jc.IsFalse)
20 }
21- _, urlPresent = cfg.AllAttrs()["tools-url"]
22- c.Assert(urlPresent, jc.IsFalse)
23+ if v, ok := cfg.AllAttrs()["tools-url"]; ok {
24+ c.Assert(v, gc.Equals, "")
25+ }
26 }
27
28 func (s *ConfigSuite) TestConfigAttrs(c *gc.C) {
29@@ -807,6 +808,7 @@
30 attrs["ca-private-key"] = ""
31 attrs["image-metadata-url"] = ""
32 attrs["tools-metadata-url"] = ""
33+ attrs["tools-url"] = ""
34 attrs["logging-config"] = "<root>=DEBUG"
35 // Default firewall mode is instance
36 attrs["firewall-mode"] = string(config.FwInstance)

Subscribers

People subscribed via source and target branches

to status/vote changes: